Browse Source

Merge branch 'cpq-dev-temp' of wangfan/adweb3-server into master

chenpeiqing 5 hours ago
parent
commit
8d1a677a61

+ 8 - 5
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/enquiry/service/impl/AdwebEnquiryServiceImpl.java

@@ -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);

+ 0 - 6
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/site/service/SelfWebSiteService.java

@@ -18,7 +18,6 @@ import org.jeecg.modules.adweb.site.constant.WordPressConstants;
 import org.jeecg.modules.adweb.site.entity.AdwebSite;
 import org.jeecg.modules.adweb.system.entity.SysException;
 import org.jeecg.modules.adweb.system.service.ISysExceptionService;
-import org.jeecg.modules.message.websocket.WebSocket;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.EnableAsync;
@@ -52,11 +51,6 @@ public class SelfWebSiteService {
     private SelfWebSiteServiceCommon selfWebSiteServiceCommon;
 
     @Resource
-    private IAdwebSiteService adwebSiteService;
-
-    @Resource
-    private WebSocket webSocket;
-    @Resource
     private WebSocketService webSocketService;
 
 

+ 2 - 2
jeecg-module-system/jeecg-system-start/src/main/resources/application-prod.yml

@@ -449,10 +449,10 @@ v2:
 
 #建站链接测试环境配置
 AdwebSiteConnect:
-  host: 52.83.163.165
+  host: 35.87.155.71
   port: 22
   username: ubuntu
-  password: Admin@123.com
+  password: adweb123@2024
   tempDomain: adweb3.topxuetang.com
   tempCname: devci2.adwebcloud.com