|
@@ -3,6 +3,7 @@ package com.fs.app.controller;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.fs.app.socket.QwImSocket;
|
|
import com.fs.app.socket.QwImSocket;
|
|
|
|
|
+import com.fs.app.socket.QwImSocketBroadcaster;
|
|
|
import com.fs.app.util.AudioUtils;
|
|
import com.fs.app.util.AudioUtils;
|
|
|
import com.fs.common.core.domain.R;
|
|
import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.core.redis.RedisCache;
|
|
import com.fs.common.core.redis.RedisCache;
|
|
@@ -619,7 +620,7 @@ public class QwMsgController {
|
|
|
private void processTextMessage(Long qwUserId, Long senderVid, Long receiverVid, Long serverId, String content, WxWorkMsgResp wxWorkMsgResp, boolean isRoom, String chatId, String chatAvatar) {
|
|
private void processTextMessage(Long qwUserId, Long senderVid, Long receiverVid, Long serverId, String content, WxWorkMsgResp wxWorkMsgResp, boolean isRoom, String chatId, String chatAvatar) {
|
|
|
// 保存聊天消息
|
|
// 保存聊天消息
|
|
|
QwMessageListVO message = aiHookService.saveQwMsg(qwUserId, senderVid, receiverVid, serverId, content, wxWorkMsgResp.getUuid(), wxWorkMsgResp.getJson(), 1, isRoom, chatId, chatAvatar);
|
|
QwMessageListVO message = aiHookService.saveQwMsg(qwUserId, senderVid, receiverVid, serverId, content, wxWorkMsgResp.getUuid(), wxWorkMsgResp.getJson(), 1, isRoom, chatId, chatAvatar);
|
|
|
- QwImSocket.broadcast(message);
|
|
|
|
|
|
|
+ QwImSocketBroadcaster.broadcast(message);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -668,7 +669,7 @@ public class QwMsgController {
|
|
|
|
|
|
|
|
// 保存聊天消息
|
|
// 保存聊天消息
|
|
|
QwMessageListVO message = aiHookService.saveQwMsg(qwUserId, senderVid, receiverVid, serverId, json.toString(), wxWorkMsgResp.getUuid(), wxWorkMsgResp.getJson(), 4, isRoom, chatId, chatAvatar);
|
|
QwMessageListVO message = aiHookService.saveQwMsg(qwUserId, senderVid, receiverVid, serverId, json.toString(), wxWorkMsgResp.getUuid(), wxWorkMsgResp.getJson(), 4, isRoom, chatId, chatAvatar);
|
|
|
- QwImSocket.broadcast(message);
|
|
|
|
|
|
|
+ QwImSocketBroadcaster.broadcast(message);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -695,7 +696,7 @@ public class QwMsgController {
|
|
|
String content = fileUrlResp.getData();
|
|
String content = fileUrlResp.getData();
|
|
|
// 保存聊天消息
|
|
// 保存聊天消息
|
|
|
QwMessageListVO message = aiHookService.saveQwMsg(qwUserId, senderVid, receiverVid, serverId, content, wxWorkMsgResp.getUuid(), wxWorkMsgResp.getJson(), 2, isRoom, chatId, chatAvatar);
|
|
QwMessageListVO message = aiHookService.saveQwMsg(qwUserId, senderVid, receiverVid, serverId, content, wxWorkMsgResp.getUuid(), wxWorkMsgResp.getJson(), 2, isRoom, chatId, chatAvatar);
|
|
|
- QwImSocket.broadcast(message);
|
|
|
|
|
|
|
+ QwImSocketBroadcaster.broadcast(message);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -714,7 +715,7 @@ public class QwMsgController {
|
|
|
String content = wxWorkMessageDTO.getUrl();
|
|
String content = wxWorkMessageDTO.getUrl();
|
|
|
// 保存聊天消息
|
|
// 保存聊天消息
|
|
|
QwMessageListVO message = aiHookService.saveQwMsg(qwUserId, senderVid, receiverVid, serverId, content, wxWorkMsgResp.getUuid(), wxWorkMsgResp.getJson(), 3, isRoom, chatId, chatAvatar);
|
|
QwMessageListVO message = aiHookService.saveQwMsg(qwUserId, senderVid, receiverVid, serverId, content, wxWorkMsgResp.getUuid(), wxWorkMsgResp.getJson(), 3, isRoom, chatId, chatAvatar);
|
|
|
- QwImSocket.broadcast(message);
|
|
|
|
|
|
|
+ QwImSocketBroadcaster.broadcast(message);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -749,7 +750,7 @@ public class QwMsgController {
|
|
|
|
|
|
|
|
// 保存聊天消息
|
|
// 保存聊天消息
|
|
|
QwMessageListVO message = aiHookService.saveQwMsg(qwUserId, senderVid, receiverVid, serverId, json.toString(), wxWorkMsgResp.getUuid(), wxWorkMsgResp.getJson(), 5, isRoom, chatId, chatAvatar);
|
|
QwMessageListVO message = aiHookService.saveQwMsg(qwUserId, senderVid, receiverVid, serverId, json.toString(), wxWorkMsgResp.getUuid(), wxWorkMsgResp.getJson(), 5, isRoom, chatId, chatAvatar);
|
|
|
- QwImSocket.broadcast(message);
|
|
|
|
|
|
|
+ QwImSocketBroadcaster.broadcast(message);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|