Kaynağa Gözat

fix : 实名认证列表增加游戏id和名称返回

bilingfeng 1 yıl önce
ebeveyn
işleme
628ed043aa

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

@@ -21,7 +21,7 @@ public class ManageApplication {
 
     public static void main(String[] args) {
         SpringApplication.run(ManageApplication.class, args);
-        System.out.println("赞象Manage服务启动成功 <dubbo升级3.0, 游戏区服修改排序> ( ´・・)ノ(._.`) \n" +
+        System.out.println("赞象Manage服务启动成功 <dubbo升级3.0, 实名认证列表增加游戏id和名称返回> ( ´・・)ノ(._.`) \n" +
                 "___  ___  ___   _   _   ___  _____  _____ \n" +
                 "|  \\/  | / _ \\ | \\ | | / _ \\|  __ \\|  ___|\n" +
                 "| .  . |/ /_\\ \\|  \\| |/ /_\\ \\ |  \\/| |__  \n" +

+ 11 - 4
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/UserCardServiceImpl.java

@@ -7,13 +7,11 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.zanxiang.game.module.manage.pojo.dto.AgentDTO;
+import com.zanxiang.game.module.manage.pojo.dto.GameDTO;
 import com.zanxiang.game.module.manage.pojo.dto.UserDTO;
 import com.zanxiang.game.module.manage.pojo.params.UserNameAuthListParam;
 import com.zanxiang.game.module.manage.pojo.vo.UserCardVO;
-import com.zanxiang.game.module.manage.service.IAgentService;
-import com.zanxiang.game.module.manage.service.IGameUserRoleService;
-import com.zanxiang.game.module.manage.service.IUserCardService;
-import com.zanxiang.game.module.manage.service.IUserService;
+import com.zanxiang.game.module.manage.service.*;
 import com.zanxiang.game.module.mybatis.entity.GameUserRole;
 import com.zanxiang.game.module.mybatis.entity.UserCard;
 import com.zanxiang.game.module.mybatis.mapper.UserCardMapper;
@@ -49,6 +47,9 @@ public class UserCardServiceImpl extends ServiceImpl<UserCardMapper, UserCard> i
     @Autowired
     private IGameUserRoleService gameUserRoleService;
 
+    @Autowired
+    private IGameService gameService;
+
     @Override
     public IPage<UserCardVO> getUserCardList(UserNameAuthListParam param) {
         //渠道获取
@@ -84,6 +85,12 @@ public class UserCardServiceImpl extends ServiceImpl<UserCardMapper, UserCard> i
         UserDTO userDTO = userService.getById(userCard.getUserId());
         GameUserRole gameUserRole = gameUserRoleService.getLastGameUserRoleName(userDTO.getId(), userDTO.getGameId());
         userCardVO.setLastGameRoleName(gameUserRole == null ? null : gameUserRole.getRoleName());
+        //游戏名称
+        userCardVO.setGameId(gameUserRole == null ? null : gameUserRole.getGameId());
+        if (userCardVO.getGameId() != null) {
+            GameDTO gameDTO = gameService.getById(userCardVO.getGameId());
+            userCardVO.setGameName(gameDTO == null ? null : gameDTO.getName());
+        }
         return userCardVO;
     }