|
@@ -21,6 +21,7 @@ import org.jeecg.common.util.FastJsonUtil;
|
|
|
import org.jeecg.modules.adweb.common.constant.NumConstant;
|
|
|
import org.jeecg.modules.adweb.common.dto.CountryAreaApiDto;
|
|
|
import org.jeecg.modules.adweb.common.service.FeishuService;
|
|
|
+import org.jeecg.modules.adweb.common.service.WebSocketService;
|
|
|
import org.jeecg.modules.adweb.common.util.*;
|
|
|
import org.jeecg.modules.adweb.enquiry.constant.EnquiryConstants;
|
|
|
import org.jeecg.modules.adweb.enquiry.constant.EnquirySendStatus;
|
|
@@ -131,6 +132,9 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
|
|
|
@Resource
|
|
|
private WebSocket webSocket;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private WebSocketService webSocketService;
|
|
|
+
|
|
|
private static final byte[] redisKey = EnquiryConstants.ENQUIRY_EMAIL.getBytes();
|
|
|
|
|
|
private static final byte[] siteRedisKey = EnquiryConstants.ENQUIRY_SITE.getBytes();
|
|
@@ -268,13 +272,12 @@ public class AdwebEnquiryServiceImpl extends ServiceImpl<AdwebEnquiryMapper, Adw
|
|
|
// 给该站点所属的用户发送消息
|
|
|
AdwebSite targetSite = adwebSiteService.getSiteByCode(target.getSiteCode());
|
|
|
SysUser sysUser = sysUserService.getUserByName("admin");
|
|
|
- String[] userIds = {targetSite.getUid(), sysUser.getId()};
|
|
|
+ SysUser demouser = sysUserService.getUserByName("adwebdemo");
|
|
|
+ String[] userIds = {targetSite.getUid(), sysUser.getId(), demouser.getId()};
|
|
|
|
|
|
// TODO 之后仅对有效询盘进行发送消息通知
|
|
|
- JSONObject obj = new JSONObject();
|
|
|
- obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_ENQUIRY);
|
|
|
- obj.put(WebsocketConst.MSG_TXT, "您已经收到询盘,请尽快处理");
|
|
|
- webSocket.sendMessage(userIds, obj.toJSONString());
|
|
|
+ webSocketService.sendMessage(userIds, "您已经收到询盘,请尽快处理", WebsocketConst.CMD_ENQUIRY);
|
|
|
+
|
|
|
|
|
|
// 发送询盘邮件
|
|
|
sendValidateEmail(adwebEnquiryList, adwebSite, principalEmailMap);
|