ソースを参照

修改客服代码

wks 10 ヶ月 前
コミット
a2ccfb341a

+ 7 - 0
src/main/java/com/ydtech/modules/admin/service/impl/WechatCustomerServiceImpl.java

@@ -115,6 +115,13 @@ public class WechatCustomerServiceImpl implements WechatCustomerService {
                     state1 = 4;
                     wxCpKfService.transServiceState(wxCpKfMsgItem.getOpenKfid(), wxCpKfMsgItem.getExternalUserId(), state1, sysWechatCustomer.getReceptionistId());
                 }
+            }else {
+                WxCpKfServiceStateResp serviceState = wxCpKfService.getServiceState(wxCpKfMsgItem.getOpenKfid(), wxCpKfMsgItem.getExternalUserId());
+                Integer state1 = serviceState.getServiceState();
+                if (workScheduleConfigService.isWorkingHours() && (state1 == 0 || state1 == 1)) {
+                    state1 = 3;
+                    wxCpKfService.transServiceState(wxCpKfMsgItem.getOpenKfid(), wxCpKfMsgItem.getExternalUserId(), state1, sysWechatCustomer.getReceptionistId());
+                }
             }
 
             List<WxCpKfMsgListResp.WxCpKfMsgItem> msgListDTOList = msgList.stream().filter(x -> "event".equals(x.getMsgType())).collect(Collectors.toList());