浏览代码

求解无日志

huangxingxing 4 月之前
父节点
当前提交
1f913b8ca1
共有 1 个文件被更改,包括 7 次插入5 次删除
  1. 7 5
      src/main/java/com/miniframe/mdo/service/LogService.java

+ 7 - 5
src/main/java/com/miniframe/mdo/service/LogService.java

@@ -63,11 +63,13 @@ public class LogService {
         } catch (IOException e) {
         } catch (IOException e) {
             e.printStackTrace();
             e.printStackTrace();
         }
         }
-//        CompletableFuture<Void> cf = CompletableFuture.supplyAsync(()->{
-//        WebsocketEndPoint webs =  (WebsocketEndPoint) UtilTools.getBean("websocketEndPoint");
-//        webs.sendMessageToUser(String.valueOf(pid),log);
-//        return null;
-//        });
+        if(log.indexOf("求解")>0){
+            CompletableFuture<Void> cf = CompletableFuture.supplyAsync(()->{
+                WebsocketEndPoint webs =  (WebsocketEndPoint) UtilTools.getBean("websocketEndPoint");
+                webs.sendMessageToUser(String.valueOf(pid),log);
+                return null;
+            });
+        }
     }
     }
     /**
     /**
      * 文件内容追加
      * 文件内容追加