Преглед на файлове

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

Letianhua преди 1 година
родител
ревизия
7ad68c3e72

+ 8 - 1
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GamePolicyConfigServiceImpl.java

@@ -7,11 +7,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.zanxiang.erp.base.ErpServer;
 import com.zanxiang.erp.base.rpc.ISysUserRpc;
 import com.zanxiang.erp.security.util.SecurityUtil;
+import com.zanxiang.game.module.manage.pojo.dto.GameDTO;
 import com.zanxiang.game.module.manage.pojo.params.GamePolicyConfigAddOrUpdateParam;
 import com.zanxiang.game.module.manage.pojo.params.GamePolicyConfigListParam;
 import com.zanxiang.game.module.manage.pojo.vo.GamePolicyConfigInnerObjVO;
 import com.zanxiang.game.module.manage.pojo.vo.GamePolicyConfigListVO;
 import com.zanxiang.game.module.manage.service.IGamePolicyConfigService;
+import com.zanxiang.game.module.manage.service.IGameService;
 import com.zanxiang.game.module.manage.service.IGameSupperService;
 import com.zanxiang.game.module.mybatis.entity.GamePolicyConfig;
 import com.zanxiang.game.module.mybatis.entity.GameSupper;
@@ -40,6 +42,9 @@ public class GamePolicyConfigServiceImpl extends ServiceImpl<GamePolicyConfigMap
     @Autowired
     private IGameSupperService gameSupperService;
 
+    @Autowired
+    private IGameService gameService;
+
     @DubboReference(providedBy = ErpServer.SERVER_DUBBO_NAME)
     private ISysUserRpc sysUserRpc;
 
@@ -119,10 +124,12 @@ public class GamePolicyConfigServiceImpl extends ServiceImpl<GamePolicyConfigMap
         String amount = configParam.get("amount");
         String time = configParam.get("time");
         GameSupper gameSupper = gameSupperService.getById(vo.getSuperGameId());
+        GameDTO game = gameService.getById(vo.getSuperGameId());
+        String superGameName = null == gameSupper ? (null == game ? null : game.getName()) : gameSupper.getName();
         return GamePolicyConfigListVO.builder()
                 .id(vo.getId())
                 .superGameId(vo.getSuperGameId())
-                .superGameName(null == gameSupper ? null : gameSupper.getName())
+                .superGameName(superGameName)
                 .type(vo.getType())
                 .amount(amount == null ? null : Long.valueOf(amount))
                 .time(time == null ? null : Long.valueOf(time))