shilin 4 vuotta sitten
vanhempi
commit
d2aaf01576

+ 10 - 2
src/main/java/com/gyee/frame/netty/websocket/WebSocketServer.java

@@ -4,7 +4,9 @@ import cn.hutool.log.Log;
 import cn.hutool.log.LogFactory;
 import com.gyee.frame.common.conf.ExceptJobConfig;
 import com.gyee.frame.common.quartz.SocketTaskUtil;
+import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.netty.websocket.util.WebsocketUtil;
+import com.gyee.frame.service.GyeeuserService;
 import com.gyee.frame.util.StringUtils;
 import org.springframework.stereotype.Component;
 
@@ -48,8 +50,6 @@ public class WebSocketServer extends SocketTaskUtil {
 
 
 
-
-
     //与某个客户端的连接会话,需要通过它来给客户端发送数据
     private Session session;
 
@@ -171,6 +171,14 @@ public class WebSocketServer extends SocketTaskUtil {
         if(!ExceptJobConfig.exceptmaps.containsKey(jobkey))
         {
             this.restartJob((jobkey));//重启任务
+        }else
+        {
+            if(jobkey.equals("pageNumber_4_functionNumber_3"))
+            {
+
+                GyeeuserService gyeeuserService=SpringUtils.getBean("gyeeuserService");
+                gyeeuserService.initialUserList();
+            }
         }
 
     }

+ 19 - 1
src/main/java/com/gyee/frame/service/GyeeuserService.java

@@ -8,6 +8,8 @@ import com.gyee.frame.mapper.auto.GyeeuserMapper;
 import com.gyee.frame.model.auto.Gyeeuser;
 import com.gyee.frame.model.auto.GyeeuserExample;
 import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.model.enumeration.Messagetype;
+import com.gyee.frame.netty.websocket.util.SocketToolService;
 import com.gyee.frame.util.SnowflakeIdWorker;
 import org.springframework.stereotype.Service;
 
@@ -23,7 +25,7 @@ import java.util.List;
  * @date 2020-04-15 16:48:37  
  **/
 @Service
-public class GyeeuserService implements BaseService<Gyeeuser, GyeeuserExample>{
+public class GyeeuserService extends SocketToolService implements BaseService<Gyeeuser, GyeeuserExample>{
 	@Resource
 	private GyeeuserMapper gyeeuserMapper;
 	
@@ -155,4 +157,20 @@ public class GyeeuserService implements BaseService<Gyeeuser, GyeeuserExample>{
 
 		return  list;
 	}
+
+
+	public void initialUserList() {
+
+		List<Gyeeuser> result=findUserlist();
+		if( !result.isEmpty())
+		{
+			for(Gyeeuser user:result)
+			{
+				user.setRemak1("0");
+			}
+		}
+		this.pushToWeb("pageNumber_4","functionNumber_3","all",result, Messagetype.MESSAGE);
+
+	}
+
 }