Browse Source

Merge branch 'dev' of GameCenter/game-center into master

zhimo 11 months ago
parent
commit
a584ff16e5

+ 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) {
         SpringApplication.run(ManageApplication.class, args);
-        System.out.println("赞象Manage服务启动成功 < (生产测试02・・)ノ(._.`) \n" +
+        System.out.println("赞象Manage服务启动成功 < (生产测试pro・・)ノ(._.`) \n" +
                 "___  ___  ___   _   _   ___  _____  _____ \n" +
                 "|  \\/  | / _ \\ | \\ | | / _ \\|  __ \\|  ___|\n" +
                 "| .  . |/ /_\\ \\|  \\| |/ /_\\ \\ |  \\/| |__  \n" +

+ 0 - 7
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/PushMsgSendLogServiceImpl.java

@@ -11,7 +11,6 @@ import com.zanxiang.game.module.mybatis.entity.GameUserRole;
 import com.zanxiang.game.module.mybatis.entity.PushMsgSendLog;
 import com.zanxiang.game.module.mybatis.entity.PushMsgSendResult;
 import com.zanxiang.game.module.mybatis.mapper.PushMsgSendLogMapper;
-import com.zanxiang.module.util.JsonUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -58,16 +57,10 @@ public class PushMsgSendLogServiceImpl extends ServiceImpl<PushMsgSendLogMapper,
         //保存发送记录
         PushMsgSendLog pushMsgSendLog = this.transform(msgId, gameId, strategyId, text, gameUserRoleList.size());
         super.save(pushMsgSendLog);
-        log.error("消息推保存日志, gameId : {}, strategyId : {}, text : {}, gameUserRoleList : {}",
-                gameId, strategyId, text, JsonUtil.toString(gameUserRoleList));
         //角色信息按区服分组
         Map<String, List<GameUserRole>> serverIdRoleMap = gameUserRoleList.stream()
                 .collect(Collectors.groupingBy(GameUserRole::getServerId));
         serverIdRoleMap.forEach((serverId, roleList) -> {
-
-            log.error("消息推送单组执行, gameId : {}, strategyId : {}, text : {}, serverId : {}, roleList : {}",
-                    gameId, strategyId, text, serverId, JsonUtil.toString(roleList));
-
             List<String> serverRoleIdList = roleList.stream().map(GameUserRole::getRoleId).collect(Collectors.toList());
             try {
                 CpSendMsgResultDTO result = cpSendMsgLogService.cpSendMsgApi(gameSupper, msgId, serverId, text, serverRoleIdList);

+ 1 - 17
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/PushMsgStrategyServiceImpl.java

@@ -9,7 +9,6 @@ import com.zanxiang.game.module.manage.pojo.dto.UserDTO;
 import com.zanxiang.game.module.manage.service.*;
 import com.zanxiang.game.module.mybatis.entity.*;
 import com.zanxiang.game.module.mybatis.mapper.PushMsgStrategyMapper;
-import com.zanxiang.module.util.JsonUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.logging.log4j.util.Strings;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -60,42 +59,27 @@ public class PushMsgStrategyServiceImpl extends ServiceImpl<PushMsgStrategyMappe
         ) <= 0) {
             return;
         }
-        log.error("消息推送执行策略, pushMsgStrategyId : {}, param : {}", pushMsgStrategy.getId(), JsonUtil.toString(param));
         //查询玩家
         UserDTO userDTO = userService.getById(param.getUserId());
         //不存在等级策略, 或者玩家为空
         if (userDTO == null) {
-            log.error("消息推送玩家信息为空, pushMsgStrategyId : {}, param : {}", pushMsgStrategy.getId(), JsonUtil.toString(param));
             return;
         }
-
-        log.error("查询到的用户信息, userDTO : {}", JsonUtil.toString(userDTO));
-
         //判断是否满足策略执行条件
         if (!this.strategyCheck(pushMsgStrategy, param, userDTO)) {
-            log.error("消息推送不满足策略条件, pushMsgStrategyId : {}, param : {}", pushMsgStrategy.getId(), JsonUtil.toString(param));
             return;
         }
-
-        log.error("策略条件判断完成, 判断通过!!!!");
-
         //查询策略执行角色
         GameUserRole gameUserRole = gameUserRoleService.getOne(new LambdaQueryWrapper<GameUserRole>()
                 .eq(GameUserRole::getGameId, param.getGameId())
                 .eq(GameUserRole::getUserId, param.getUserId())
                 .eq(GameUserRole::getRoleId, param.getRoleId()));
-
-        log.error("查询执行策略的角色, gameUserRole : {}", JsonUtil.toString(gameUserRole));
-
         //查询策略执行文本
         String strategyText = pushMsgTextStrategy.getStrategyText(gameUserRole);
-        log.error("消息推送查询到文本, param : {}, strategyText : {}", JsonUtil.toString(param), strategyText);
         if (Strings.isBlank(strategyText)) {
-            log.error("消息推送文本内容为空, pushMsgStrategyId : {}, param : {}", pushMsgStrategy.getId(), JsonUtil.toString(param));
             return;
         }
         //执行发送
-        log.error("执行消息推送, param : {}", JsonUtil.toString(param));
         pushMsgSendLogService.pushMsg(param.getGameId(), pushMsgStrategy.getId(), strategyText, Collections.singletonList(gameUserRole));
     }
 
@@ -148,7 +132,7 @@ public class PushMsgStrategyServiceImpl extends ServiceImpl<PushMsgStrategyMappe
                     .eq(RoleOperate::getGameId, param.getGameId())
                     .eq(RoleOperate::getServerId, param.getServerId())
                     .eq(RoleOperate::getRoleId, param.getRoleId()));
-            if (Objects.equals(roleOperate.getIsAddCorpWechat(), 1)) {
+            if (roleOperate != null && Objects.equals(roleOperate.getIsAddCorpWechat(), 1)) {
                 return Boolean.FALSE;
             }
         }