Browse Source

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

shishaosong 1 year ago
parent
commit
f7ed7751d7

+ 8 - 4
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameGiftServiceImpl.java

@@ -12,7 +12,9 @@ import com.zanxiang.game.module.manage.pojo.params.GameGiftAddParam;
 import com.zanxiang.game.module.manage.pojo.params.GameGiftListParam;
 import com.zanxiang.game.module.manage.pojo.vo.GameGiftListVO;
 import com.zanxiang.game.module.manage.service.IGameService;
+import com.zanxiang.game.module.manage.service.IGameSupperService;
 import com.zanxiang.game.module.mybatis.entity.GameGift;
+import com.zanxiang.game.module.mybatis.entity.GameSupper;
 import com.zanxiang.game.module.mybatis.entity.RoleMailRecord;
 import com.zanxiang.game.module.mybatis.mapper.GameGiftMapper;
 import com.zanxiang.game.module.manage.service.IGameGiftService;
@@ -39,6 +41,8 @@ import java.util.stream.Collectors;
 public class GameGiftServiceImpl extends ServiceImpl<GameGiftMapper, GameGift> implements IGameGiftService {
     @Autowired
     private IGameService gameService;
+    @Autowired
+    private IGameSupperService gameSupperService;
     @DubboReference(providedBy = ErpServer.SERVER_DUBBO_NAME)
     private ISysUserRpc sysUserRpc;
 
@@ -96,11 +100,11 @@ public class GameGiftServiceImpl extends ServiceImpl<GameGiftMapper, GameGift> i
                 .stream()
                 .map(item -> {
                     GameDTO game = gameService.getById(item.getParentGameId());
-                    GameDTO superGame = gameService.getById(item.getSuperGameId());
+                    GameSupper gameSupper = gameSupperService.getById(item.getSuperGameId());
                     return GameGiftListVO.builder()
                             .id(item.getId())
                             .superGameId(item.getSuperGameId())
-                            .superGameName(null == superGame ? null:superGame.getName())
+                            .superGameName(null == gameSupper ? null : gameSupper.getName())
                             .parentGameId(item.getParentGameId())
                             .parentGameName(null == game ? null : game.getName())
                             .giftName(item.getGiftName())
@@ -134,11 +138,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());
+                    GameSupper gameSupper = gameSupperService.getById(item.getSuperGameId());
                     return GameGiftListVO.builder()
                             .id(item.getId())
                             .superGameId(item.getSuperGameId())
-                            .superGameName(null == superGame ? null:superGame.getName())
+                            .superGameName(null == gameSupper ? null : gameSupper.getName())
                             .parentGameId(item.getParentGameId())
                             .parentGameName(null == game ? null : game.getName())
                             .giftName(item.getGiftName())