吴树波 1 день назад
Родитель
Сommit
c9b5afca99

+ 1 - 1
fs-service/src/main/java/com/fs/qw/service/impl/AsyncChatSopService.java

@@ -71,7 +71,7 @@ public class AsyncChatSopService {
 
     private void processInternal(ChatSopRuleTimeVO timeVO, QwSopTemp temp, Map<String, QwUserVO> qwUserMap, Map<String, QwGroupChat> groupChatMap) {
         if(StringUtils.isNotEmpty(timeVO.getChatId())){
-            List<SopUserLogs> list = Arrays.stream(timeVO.getChatId().split(",")).map(e -> {
+            List<SopUserLogs> list = Arrays.stream(timeVO.getChatId().split(",")).filter(StringUtils::isNotEmpty).map(e -> {
                 SopUserLogs sopUserLogs = new SopUserLogs();
                 sopUserLogs.setSopId(timeVO.getId());
                 sopUserLogs.setSopTempId(temp.getId());

+ 1 - 1
fs-service/src/main/java/com/fs/sop/service/impl/SopUserLogsServiceImpl.java

@@ -1049,7 +1049,7 @@ public class SopUserLogsServiceImpl implements ISopUserLogsService {
         List<QwGroupChat> qwGroupChatList = qwGroupChatService.selectQwGroupChatByChatIds(vo.getChatIds().split(","));
         Map<String, QwGroupChat> groupChatMap = PubFun.listToMapByGroupObject(qwGroupChatList, QwGroupChat::getChatId);
 
-        List<SopUserLogs> list = Arrays.stream(vo.getChatIds().split(",")).map(e -> {
+        List<SopUserLogs> list = Arrays.stream(vo.getChatIds().split(",")).filter(StringUtils::isNotEmpty).distinct().map(e -> {
             SopUserLogs sopUserLogs = new SopUserLogs();
             sopUserLogs.setSopId(qwSop.getId());
             sopUserLogs.setSopTempId(qwSop.getTempId());