Ver código fonte

E级客户不发送

三七 1 semana atrás
pai
commit
a0de2683ef

+ 13 - 9
fs-qw-task/src/main/java/com/fs/app/taskService/impl/SopLogsTaskServiceImpl.java

@@ -715,7 +715,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
             ruleTimeVO.setSendType(6);
             ruleTimeVO.setType(2);
             if (groupChat.getChatUserList() != null && !groupChat.getChatUserList().isEmpty()) {
-                QwSopLogs sopLogs = createBaseLog(formattedSendTime, logVo, ruleTimeVO, groupChat.getChatId(), groupChat.getName(), null, isOfficial, null);
+                QwSopLogs sopLogs = createBaseLog(formattedSendTime, logVo, ruleTimeVO, groupChat.getChatId(), groupChat.getName(), null, isOfficial, null,null);
                 handleLogBasedOnType(sopLogs, content, logVo, sendTime, courseId, videoId,
                         type, qwUserId, companyUserId, companyId, groupChat.getChatId(), welcomeText, qwUserName,
                         null, true, miniAppId, groupChat,config, miniMap, null, sendMsgType,companies);
@@ -745,7 +745,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
                     String externalUserName = contactId.getExternalUserName();
                     Long fsUserId = contactId.getFsUserId();
                     Integer grade = contactId.getGrade();
-                    QwSopLogs sopLogs = createBaseLog(formattedSendTime, logVo, ruleTimeVO, contactId.getExternalContactId(), externalUserName, fsUserId, isOfficial, contactId.getExternalId());
+                    QwSopLogs sopLogs = createBaseLog(formattedSendTime, logVo, ruleTimeVO, contactId.getExternalContactId(), externalUserName, fsUserId, isOfficial, contactId.getExternalId(),contactId.getIsDaysNotStudy());
                     handleLogBasedOnType(sopLogs, content, logVo, sendTime, courseId, videoId,
                             type, qwUserId, companyUserId, companyId, externalId, welcomeText, qwUserName, fsUserId, false, miniAppId,
                             null,config, miniMap, grade, sendMsgType,companies);
@@ -791,7 +791,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
     private QwSopLogs createBaseLog(String formattedSendTime, SopUserLogsVo logVo,
                                     QwSopRuleTimeVO ruleTimeVO, String externalContactId,
                                     String externalUserName, Long fsUserId,Integer isOfficial,
-                                    Long externalId) {
+                                    Long externalId,Integer isDaysNotStudy) {
         QwSopLogs sopLogs = new QwSopLogs();
         sopLogs.setSendTime(formattedSendTime);
         sopLogs.setQwUserid(logVo.getQwUserId());
@@ -799,6 +799,15 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
         sopLogs.setLogType(ruleTimeVO.getType());
         sopLogs.setTakeRecords(0);
 
+        if (isOfficial != 1 && Integer.valueOf(1).equals(isDaysNotStudy)) {
+            sopLogs.setSendStatus(5L);
+            sopLogs.setRemark("E级客户不发送");
+        }else {
+            sopLogs.setSendStatus(3L);
+        }
+
+        sopLogs.setReceivingStatus(0L);
+
         if (isOfficial == 1) {
 
             if (logVo.getIsSampSend()== 1) {
@@ -828,17 +837,12 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
         }
 
 
-        sopLogs.setSendStatus(3L);
-        sopLogs.setReceivingStatus(0L);
+
 
         String[] userKey = logVo.getUserId().split("\\|");
-        log.info("sopLogVo:{}", JSON.toJSONString(logVo));
-        log.info("sop_logs -》 userId:{}", logVo.getUserId());
-        log.info("sop_logs -》 userId -》 split:{}", Arrays.asList(userKey));
         sopLogs.setCompanyId(Long.valueOf(userKey[2].trim()));
         if (StringUtils.isNotEmpty(userKey[0].trim())){
             sopLogs.setQwUserKey(Long.valueOf(userKey[0].trim()));
-            log.info("qw_sop数据:{}", JSON.toJSONString(sopLogs));
         }
         sopLogs.setSopId(logVo.getSopId());
         sopLogs.setSort(Integer.valueOf(logVo.getStartTime().replaceAll("-","")));

+ 8 - 2
fs-service/src/main/java/com/fs/wxwork/service/WxWorkServiceImpl.java

@@ -120,8 +120,14 @@ public class WxWorkServiceImpl implements WxWorkService {
     @Override
     public WxWorkResponseDTO<WxwLoginOutRespDTO> LoginOut(WxWorkGetQrCodeDTO param,Long serverId) {
         String url = getUrl(serverId) + "/LoginOut";
-        return WxWorkHttpUtil.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwLoginOutRespDTO>>() {
-        });
+        try {
+            return WxWorkHttpUtil.postWithType(url, param, new TypeReference<WxWorkResponseDTO<WxwLoginOutRespDTO>>() {
+            });
+        }catch (Exception e){
+            log.error("LoginOut error",e);
+            return null;
+        }
+
     }
 
     @Override