Ver código fonte

fix : 已接入玩家取消自动回复

bilingfeng 1 ano atrás
pai
commit
14300649d4

+ 1 - 1
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/ManageApplication.java

@@ -23,7 +23,7 @@ public class ManageApplication {
 
 
     public static void main(String[] args) {
     public static void main(String[] args) {
         SpringApplication.run(ManageApplication.class, args);
         SpringApplication.run(ManageApplication.class, args);
-        System.out.println("赞象Manage服务启动成功 < ( 修改类名重启´・・)ノ(._.`) \n" +
+        System.out.println("赞象Manage服务启动成功 < ( 下班时间, 已接入玩家取消自动回复´・・)ノ(._.`) \n" +
                 "___  ___  ___   _   _   ___  _____  _____ \n" +
                 "___  ___  ___   _   _   ___  _____  _____ \n" +
                 "|  \\/  | / _ \\ | \\ | | / _ \\|  __ \\|  ___|\n" +
                 "|  \\/  | / _ \\ | \\ | | / _ \\|  __ \\|  ___|\n" +
                 "| .  . |/ /_\\ \\|  \\| |/ /_\\ \\ |  \\/| |__  \n" +
                 "| .  . |/ /_\\ \\|  \\| |/ /_\\ \\ |  \\/| |__  \n" +

+ 5 - 0
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/KfAppletMsgServiceImpl.java

@@ -179,6 +179,11 @@ public class KfAppletMsgServiceImpl implements IKfAppletMsgService {
     }
     }
 
 
     private void systemReplyHandle(Long gameId, String openId, KfRoom kfRoom) {
     private void systemReplyHandle(Long gameId, String openId, KfRoom kfRoom) {
+        //判断玩家是否已接入状态, 非带接入状态, 不发送
+        KfSessionUser kfSessionUser = kfSessionUserService.getById(openId);
+        if (Objects.equals(kfSessionUser.getIsWait(), Boolean.FALSE)) {
+            return;
+        }
         //获取自动回复配置
         //获取自动回复配置
         KfSystemReply kfSystemReply = kfSystemReplyService.getById(gameId);
         KfSystemReply kfSystemReply = kfSystemReplyService.getById(gameId);
         if (kfSystemReply == null) {
         if (kfSystemReply == null) {