Przeglądaj źródła

fix : 玩家封禁新增字段, 聊天记录增加查询条件-02

bilingfeng 5 dni temu
rodzic
commit
a10179f018

+ 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服务启动成功 < (玩家封禁新增字段, 聊天记录增加查询条件-01 ・・)ノ(._.`) \n" +
+        System.out.println("赞象Manage服务启动成功 < (玩家封禁新增字段, 聊天记录增加查询条件-02 ・・)ノ(._.`) \n" +
                 "___  ___  ___   _   _   ___  _____  _____ \n" +
                 "|  \\/  | / _ \\ | \\ | | / _ \\|  __ \\|  ___|\n" +
                 "| .  . |/ /_\\ \\|  \\| |/ /_\\ \\ |  \\/| |__  \n" +

+ 1 - 0
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameUserChatServiceImpl.java

@@ -59,6 +59,7 @@ public class GameUserChatServiceImpl extends ServiceImpl<GameUserChatMapper, Gam
                 .select(GameServer::getServerId, GameServer::getServerName)
                 .eq(GameServer::getGameId, supperGameId)
                 .eq(GameServer::getIsSourceServer, Boolean.TRUE)
+                .orderByDesc(GameServer::getCreateTime)
         ).stream().collect(Collectors.toMap(GameServer::getServerId, GameServer::getServerName));
     }
 

+ 8 - 9
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/UserBanServiceImpl.java

@@ -11,7 +11,6 @@ import com.zanxiang.game.module.manage.pojo.dto.UserDTO;
 import com.zanxiang.game.module.manage.pojo.params.UserBanListParam;
 import com.zanxiang.game.module.manage.pojo.params.UserBanUpdateParam;
 import com.zanxiang.game.module.manage.pojo.vo.UserBanVO;
-import com.zanxiang.game.module.manage.pojo.vo.UserCardVO;
 import com.zanxiang.game.module.manage.service.IUserBanService;
 import com.zanxiang.game.module.manage.service.IUserCardService;
 import com.zanxiang.game.module.manage.service.IUserService;
@@ -99,7 +98,7 @@ public class UserBanServiceImpl extends ServiceImpl<UserBanMapper, UserBan> impl
                 .eq(UserCard::getUserId, userBan.getUserId())
                 .orderByDesc(UserCard::getCreateTime)
                 .last("limit 1"));
-        if (userCard != null){
+        if (userCard != null && Strings.isNotBlank(userCard.getCardId())) {
             userBan.setCardId(userCard.getCardId());
         }
         return super.save(userBan);
@@ -113,13 +112,13 @@ public class UserBanServiceImpl extends ServiceImpl<UserBanMapper, UserBan> impl
                 .regTime(userDTO.getCreateTime())
                 .banTime(LocalDateTime.now())
                 .status(status)
-                .ip(userDTO.getIp())
-                .mac(userDTO.getMac())
-                .imei(userDTO.getImei())
-                .oaid(userDTO.getOaid())
-                .androidId(userDTO.getAndroidId())
-                .idfa(userDTO.getIdfa())
-                .caid(userDTO.getCaid())
+                .ip(Strings.isNotBlank(userDTO.getIp()) ? userDTO.getIp() : null)
+                .mac(Strings.isNotBlank(userDTO.getMac()) ? userDTO.getMac() : null)
+                .imei(Strings.isNotBlank(userDTO.getImei()) ? userDTO.getImei() : null)
+                .oaid(Strings.isNotBlank(userDTO.getOaid()) ? userDTO.getOaid() : null)
+                .androidId(Strings.isNotBlank(userDTO.getAndroidId()) ? userDTO.getAndroidId() : null)
+                .idfa(Strings.isNotBlank(userDTO.getIdfa()) ? userDTO.getIdfa() : null)
+                .caid(Strings.isNotBlank(userDTO.getCaid()) ? userDTO.getCaid() : null)
                 .operateId(SecurityUtil.getUserId())
                 .operateName(SecurityUtil.getTokenInfo().getNickname())
                 .createTime(LocalDateTime.now())