浏览代码

修改内容:角色操作

shishaosong 1 年之前
父节点
当前提交
296cb21f6e

+ 6 - 0
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/GameGiftListVO.java

@@ -15,6 +15,12 @@ public class GameGiftListVO {
     @ApiModelProperty(notes = "id")
     private Long id;
 
+    @ApiModelProperty("超父游戏id")
+    private Long superGameId;
+
+    @ApiModelProperty("超父游戏名称")
+    private String superGameName;
+
     @ApiModelProperty("父游戏id")
     private Long parentGameId;
 

+ 6 - 0
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameGiftServiceImpl.java

@@ -96,8 +96,11 @@ public class GameGiftServiceImpl extends ServiceImpl<GameGiftMapper, GameGift> i
                 .stream()
                 .map(item -> {
                     GameDTO game = gameService.getById(item.getParentGameId());
+                    GameDTO superGame = gameService.getById(item.getSuperGameId());
                     return GameGiftListVO.builder()
                             .id(item.getId())
+                            .superGameId(item.getSuperGameId())
+                            .superGameName(null == superGame ? null:superGame.getName())
                             .parentGameId(item.getParentGameId())
                             .parentGameName(null == game ? null : game.getName())
                             .giftName(item.getGiftName())
@@ -131,8 +134,11 @@ public class GameGiftServiceImpl extends ServiceImpl<GameGiftMapper, GameGift> i
                 .eq(GameGift::getIsDelete, 0))
                 .convert(item -> {
                     GameDTO game = gameService.getById(item.getParentGameId());
+                    GameDTO superGame = gameService.getById(item.getSuperGameId());
                     return GameGiftListVO.builder()
                             .id(item.getId())
+                            .superGameId(item.getSuperGameId())
+                            .superGameName(null == superGame ? null:superGame.getName())
                             .parentGameId(item.getParentGameId())
                             .parentGameName(null == game ? null : game.getName())
                             .giftName(item.getGiftName())