Merge branch 'master' into docker_package

This commit is contained in:
wangliwen 2022-07-21 15:18:44 +08:00
commit 826f327482
2 changed files with 5 additions and 10 deletions

View File

@ -238,7 +238,7 @@ public class TAbilityApplicationController {
put("instanceId", tAbilityApplicationDTOList.get(0).getInstanceId()); // 流程id put("instanceId", tAbilityApplicationDTOList.get(0).getInstanceId()); // 流程id
put("resourceOwnerDept", tAbilityApplicationDTOList.get(0).getResourceOwnerDept()); // 资源所属部门信息 put("resourceOwnerDept", tAbilityApplicationDTOList.get(0).getResourceOwnerDept()); // 资源所属部门信息
put("resources", resourceDTOS);//申请的该部门的能力资源 put("resources", resourceDTOS);//申请的该部门的能力资源
if (tAbilityApplicationDTOList.get(0).getApplyFlag().equals("通过")) { if (tAbilityApplicationDTOList.get(0).getApproveStatus().equals("通过")) {
put("ended", true); put("ended", true);
} else { } else {
put("ended", false); put("ended", false);

View File

@ -16,8 +16,6 @@ import java.io.IOException;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/** /**
* WebSocket服务 * WebSocket服务
@ -26,7 +24,6 @@ import java.util.concurrent.Executors;
@Component @Component
@ServerEndpoint(value = "/websocket", configurator = WebSocketConfig.class) @ServerEndpoint(value = "/websocket", configurator = WebSocketConfig.class)
public class WebSocketServer { public class WebSocketServer {
private static final ExecutorService executor = Executors.newWorkStealingPool();
private static final Logger logger = LoggerFactory.getLogger(WebSocketServer.class); private static final Logger logger = LoggerFactory.getLogger(WebSocketServer.class);
public WebSocketServer() { public WebSocketServer() {
@ -81,9 +78,7 @@ public class WebSocketServer {
public void sendMessage(Long userId, MessageData<?> message) { public void sendMessage(Long userId, MessageData<?> message) {
servers.values().forEach(info -> { servers.values().forEach(info -> {
if (userId.equals(info.getUserId())) { if (userId.equals(info.getUserId())) {
executor.execute(() -> {
sendMessage(info.getSession(), message); sendMessage(info.getSession(), message);
});
} }
}); });
} }
@ -94,9 +89,9 @@ public class WebSocketServer {
* @param message 消息内容 * @param message 消息内容
*/ */
public void sendMessageAll(MessageData<?> message) { public void sendMessageAll(MessageData<?> message) {
servers.values().forEach(info -> executor.execute(() -> { servers.values().forEach(info ->
sendMessage(info.getSession(), message); sendMessage(info.getSession(), message)
})); );
} }
public void sendMessage(Session session, MessageData<?> message) { public void sendMessage(Session session, MessageData<?> message) {