Kaynağa Gözat

群发消息,@所有人功能代码恢复

luolinsong 2 ay önce
ebeveyn
işleme
ff04b31e44

+ 19 - 4
fs-ipad-task/src/main/java/com/fs/app/service/IpadSendServer.java

@@ -38,10 +38,7 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import java.time.LocalDateTime;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
+import java.util.*;
 import java.util.stream.Collectors;
 
 @Slf4j
@@ -263,6 +260,21 @@ public class IpadSendServer {
         }
     }
 
+    
+    public void sendTxtAtMsg(BaseVo vo) {
+        WxSendTextAtMsgTwoDTO dto = new WxSendTextAtMsgTwoDTO();
+        List<WxSendTextAtMsgTwoDTO.Contentva> contentvaList = new ArrayList<>();
+        WxSendTextAtMsgTwoDTO.Contentva contentva = new WxSendTextAtMsgTwoDTO.Contentva();
+        contentva.setMsgtype(5);
+        contentva.setVid(0);
+        contentvaList.add(contentva);
+        dto.setContentva(contentvaList);
+        dto.setBase(vo);
+        dto.setUuid(vo.getUuid());
+        dto.setSend_userid(ipadSendUtils.userIds(vo));
+        dto.setIsRoom(true);
+       ipadSendUtils.sendTxtAtMsgVo(dto, vo.getServerId());
+    }
     public void sendVoice(BaseVo vo, QwSopCourseFinishTempSetting.Setting content) {
         if (StringUtils.isEmpty(content.getVoiceUrl()) || StringUtils.isEmpty(content.getVoiceDuration())) {
             log.debug("语音未生成无法发送,转文字发送:{}", vo);
@@ -468,6 +480,9 @@ public class IpadSendServer {
                     // 视频号
                     sendWxVideo(vo, content);
                     break;
+                case "99":
+                    // 群发
+                    sendTxtAtMsg(vo);
                 default:
                     // 未知类型,记录警告
                     log.error("SOP_LOG_ID:{}错误的发送类型: {}", qwSopLogs.getId(), content.getContentType());