Merge branch 'master' into docker_package
This commit is contained in:
commit
826f327482
|
@ -238,7 +238,7 @@ public class TAbilityApplicationController {
|
|||
put("instanceId", tAbilityApplicationDTOList.get(0).getInstanceId()); // 流程id
|
||||
put("resourceOwnerDept", tAbilityApplicationDTOList.get(0).getResourceOwnerDept()); // 资源所属部门信息
|
||||
put("resources", resourceDTOS);//申请的该部门的能力资源
|
||||
if (tAbilityApplicationDTOList.get(0).getApplyFlag().equals("通过")) {
|
||||
if (tAbilityApplicationDTOList.get(0).getApproveStatus().equals("通过")) {
|
||||
put("ended", true);
|
||||
} else {
|
||||
put("ended", false);
|
||||
|
|
|
@ -16,8 +16,6 @@ import java.io.IOException;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
/**
|
||||
* WebSocket服务
|
||||
|
@ -26,7 +24,6 @@ import java.util.concurrent.Executors;
|
|||
@Component
|
||||
@ServerEndpoint(value = "/websocket", configurator = WebSocketConfig.class)
|
||||
public class WebSocketServer {
|
||||
private static final ExecutorService executor = Executors.newWorkStealingPool();
|
||||
private static final Logger logger = LoggerFactory.getLogger(WebSocketServer.class);
|
||||
|
||||
public WebSocketServer() {
|
||||
|
@ -81,9 +78,7 @@ public class WebSocketServer {
|
|||
public void sendMessage(Long userId, MessageData<?> message) {
|
||||
servers.values().forEach(info -> {
|
||||
if (userId.equals(info.getUserId())) {
|
||||
executor.execute(() -> {
|
||||
sendMessage(info.getSession(), message);
|
||||
});
|
||||
sendMessage(info.getSession(), message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -94,9 +89,9 @@ public class WebSocketServer {
|
|||
* @param message 消息内容
|
||||
*/
|
||||
public void sendMessageAll(MessageData<?> message) {
|
||||
servers.values().forEach(info -> executor.execute(() -> {
|
||||
sendMessage(info.getSession(), message);
|
||||
}));
|
||||
servers.values().forEach(info ->
|
||||
sendMessage(info.getSession(), message)
|
||||
);
|
||||
}
|
||||
|
||||
public void sendMessage(Session session, MessageData<?> message) {
|
||||
|
|
Loading…
Reference in New Issue