Explorar el Código

求解无日志

huangxingxing hace 4 meses
padre
commit
1f913b8ca1
Se han modificado 1 ficheros con 7 adiciones y 5 borrados
  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) {
             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;
+            });
+        }
     }
     /**
      * 文件内容追加