Przeglądaj źródła

小程序查看提示修改

anderx 1 rok temu
rodzic
commit
455ce789b7

+ 1 - 1
src/main/java/com/goafanti/common/mapper/NoticeMapper.xml

@@ -223,7 +223,7 @@
 		from notice n 
 		LEFT JOIN organization_identity oi on n.uid = oi.uid
 		LEFT JOIN admin a on a.id = n.pid 
-    where n.readed = 0 and n.notice_type in(54,55,56)
+    where n.readed = 0 and n.notice_type in(54,55,56,72)
     <if test="aid != null">
     	and n.aid = #{aid}
     </if>

+ 5 - 9
src/main/java/com/goafanti/core/websocket/SystemWebSocketHandler.java

@@ -1,18 +1,13 @@
 package com.goafanti.core.websocket;
 
+import com.goafanti.common.utils.LoggerUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.web.socket.*;
+
 import java.io.IOException;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.springframework.stereotype.Service;
-import org.springframework.web.socket.CloseStatus;
-import org.springframework.web.socket.TextMessage;
-import org.springframework.web.socket.WebSocketHandler;
-import org.springframework.web.socket.WebSocketMessage;
-import org.springframework.web.socket.WebSocketSession;
-
-import com.goafanti.common.utils.LoggerUtils;
-
 @Service
 public class SystemWebSocketHandler implements WebSocketHandler {
 	
@@ -86,6 +81,7 @@ public class SystemWebSocketHandler implements WebSocketHandler {
 			try {
 				if (user.isOpen()) {
 					user.sendMessage(message);
+					LoggerUtils.debug(getClass(), "用户" + userId + "websocket通知消息成功");
 				}
 			} catch (IOException e) {
 				LoggerUtils.error(getClass(), "用户" + userId + "websocket通知异常", e);