|
@@ -3,6 +3,7 @@ package com.zanxiang.game.data.serve.service.impl;
|
|
import com.google.common.base.CaseFormat;
|
|
import com.google.common.base.CaseFormat;
|
|
import com.zanxiang.erp.base.ErpServer;
|
|
import com.zanxiang.erp.base.ErpServer;
|
|
import com.zanxiang.erp.base.rpc.ISysUserRpc;
|
|
import com.zanxiang.erp.base.rpc.ISysUserRpc;
|
|
|
|
+import com.zanxiang.erp.security.util.SecurityUtil;
|
|
import com.zanxiang.game.data.serve.component.DataPowerComponent;
|
|
import com.zanxiang.game.data.serve.component.DataPowerComponent;
|
|
import com.zanxiang.game.data.serve.pojo.dto.*;
|
|
import com.zanxiang.game.data.serve.pojo.dto.*;
|
|
import com.zanxiang.game.data.serve.pojo.entity.AdsGameServerDay;
|
|
import com.zanxiang.game.data.serve.pojo.entity.AdsGameServerDay;
|
|
@@ -14,6 +15,8 @@ import com.zanxiang.game.data.serve.pojo.vo.*;
|
|
import com.zanxiang.game.data.serve.service.IGameServerService;
|
|
import com.zanxiang.game.data.serve.service.IGameServerService;
|
|
import com.zanxiang.game.data.serve.utils.Page;
|
|
import com.zanxiang.game.data.serve.utils.Page;
|
|
import com.zanxiang.game.module.base.ServerInfo;
|
|
import com.zanxiang.game.module.base.ServerInfo;
|
|
|
|
+import com.zanxiang.game.module.base.pojo.enums.GameAuthEnum;
|
|
|
|
+import com.zanxiang.game.module.base.pojo.vo.GameAuthUserVO;
|
|
import com.zanxiang.game.module.base.rpc.GameAuthRpc;
|
|
import com.zanxiang.game.module.base.rpc.GameAuthRpc;
|
|
import com.zanxiang.module.util.pojo.ResultVO;
|
|
import com.zanxiang.module.util.pojo.ResultVO;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -555,12 +558,12 @@ public class GameServerServiceImpl implements IGameServerService {
|
|
//把所有gsIds取出来用,拼起来
|
|
//把所有gsIds取出来用,拼起来
|
|
String gsIds = vos.stream().filter(i -> StringUtils.isNotEmpty(i.getGsIds())).map(GSGameServerDayVO::getGsIds).collect(Collectors.joining(","));
|
|
String gsIds = vos.stream().filter(i -> StringUtils.isNotEmpty(i.getGsIds())).map(GSGameServerDayVO::getGsIds).collect(Collectors.joining(","));
|
|
ResultVO<Map<Long, String>> userMap = null;
|
|
ResultVO<Map<Long, String>> userMap = null;
|
|
-// if (StringUtils.isNotEmpty(gsIds)) {
|
|
|
|
-// //转换为Long类型
|
|
|
|
-// List<Long> userIds = Arrays.stream(gsIds.split(",")).map(Long::parseLong).toList();
|
|
|
|
-// //发送RPC接口查询所有用户
|
|
|
|
-// userMap = sysUserRpc.getUserNameByIds(userIds);
|
|
|
|
-// }
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(gsIds)) {
|
|
|
|
+ //转换为Long类型
|
|
|
|
+ List<Long> userIds = Arrays.stream(gsIds.split(",")).map(Long::parseLong).toList();
|
|
|
|
+ //发送RPC接口查询所有用户
|
|
|
|
+ userMap = sysUserRpc.getUserNameByIds(userIds);
|
|
|
|
+ }
|
|
for (GSGameServerDayVO vo : vos) {
|
|
for (GSGameServerDayVO vo : vos) {
|
|
List<GSGameServerDayRVO> rDataList = collect.get(vo.getSourceSystem() + vo.getServerId() + vo.getParentGameId());
|
|
List<GSGameServerDayRVO> rDataList = collect.get(vo.getSourceSystem() + vo.getServerId() + vo.getParentGameId());
|
|
for (int i = 0; i < fieldList.size(); i++) {
|
|
for (int i = 0; i < fieldList.size(); i++) {
|
|
@@ -828,13 +831,13 @@ public class GameServerServiceImpl implements IGameServerService {
|
|
|
|
|
|
|
|
|
|
private Criteria getGameServerDayCriteria(GSGameServerDayDTO dto) {
|
|
private Criteria getGameServerDayCriteria(GSGameServerDayDTO dto) {
|
|
-// GameAuthUserVO userGameInfo = gameAuthRpc.getGameAuthByUserIds().getData();
|
|
|
|
|
|
+ GameAuthUserVO userGameInfo = gameAuthRpc.getGameAuthByUserIds().getData();
|
|
List<Long> serverIdByGS = null;
|
|
List<Long> serverIdByGS = null;
|
|
//判断是不是GS
|
|
//判断是不是GS
|
|
-// if (GameAuthEnum.getByValue(userGameInfo.getGameAuthEnum().getValue()) != null) {
|
|
|
|
-// //查询GS管理的区服列表
|
|
|
|
-// serverIdByGS = getServerIdByGSId(SecurityUtil.getUserId()).stream().filter(StringUtils::isNotEmpty).map(Long::parseLong).collect(Collectors.toList());
|
|
|
|
-// }
|
|
|
|
|
|
+ if (GameAuthEnum.getByValue(userGameInfo.getGameAuthEnum().getValue()) != null) {
|
|
|
|
+ //查询GS管理的区服列表
|
|
|
|
+ serverIdByGS = getServerIdByGSId(SecurityUtil.getUserId()).stream().filter(StringUtils::isNotEmpty).map(Long::parseLong).collect(Collectors.toList());
|
|
|
|
+ }
|
|
//创建查询条件
|
|
//创建查询条件
|
|
Criteria cri = Cnd.cri();
|
|
Criteria cri = Cnd.cri();
|
|
if (CollectionUtils.isNotEmpty(serverIdByGS)) {
|
|
if (CollectionUtils.isNotEmpty(serverIdByGS)) {
|