Kaynağa Gözat

Merge remote-tracking branch 'origin/package' into package

lth 1 yıl önce
ebeveyn
işleme
e2304f6932

+ 1 - 0
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/AgentServiceImpl.java

@@ -238,6 +238,7 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements
         if (Objects.equals(agentId, Agent.DEFAULT_AGENT)) {
             //超管, 运营, 组长可以查询自然量
             if (SecurityUtil.isAdmin() || sysGameUserGroupRpcVO != null
+                    || Objects.equals(gameAuthRole.getAuthType(), GameAuthEnum.MANAGE.getValue())
                     || Objects.equals(gameAuthRole.getAuthType(), GameAuthEnum.OPERATE.getValue())) {
                 return Tuples.of(Collections.singletonList(Agent.DEFAULT_AGENT), Collections.emptyList());
             }

+ 1 - 2
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameRemitLogServiceImpl.java

@@ -6,7 +6,6 @@ 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.erp.security.util.SecurityUtil;
-import com.zanxiang.game.module.base.pojo.enums.GameAuthEnum;
 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.params.GameRemitLogListParam;
@@ -58,7 +57,7 @@ public class GameRemitLogServiceImpl extends ServiceImpl<GameRemitLogMapper, Gam
         //渠道获取
         Tuple2<List<Long>, List<AgentDTO>> tuple2 = agentService.getUserAgent(null, null, null);
         List<Long> agentIdList = tuple2.getT1();
-        if (Objects.equals(gameTuple.getT1(), GameAuthEnum.PITCHER.getValue()) && CollectionUtils.isEmpty(agentIdList)) {
+        if (CollectionUtils.isEmpty(agentIdList)) {
             return new Page<>();
         }
         //查询

+ 5 - 5
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/OrderServiceImpl.java

@@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.zanxiang.erp.security.util.SecurityUtil;
 import com.zanxiang.game.module.base.ServerInfo;
-import com.zanxiang.game.module.base.pojo.enums.GameAuthEnum;
 import com.zanxiang.game.module.base.pojo.enums.GameCategoryEnum;
 import com.zanxiang.game.module.base.pojo.enums.PayDeviceEnum;
 import com.zanxiang.game.module.base.pojo.enums.PayWayEnum;
@@ -125,7 +124,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
         Tuple2<List<Long>, List<AgentDTO>> tuple2 = agentService.getUserAgent(param.getAccountId(), param.getPitcherId(), param.getChannelId());
         List<Long> agentIds = tuple2.getT1();
         //投手没有渠道, 看不见数据
-        if (Objects.equals(gameTuple.getT1(), GameAuthEnum.PITCHER.getValue()) && CollectionUtils.isEmpty(agentIds)) {
+        if (CollectionUtils.isEmpty(agentIds)) {
             return new OrderListVO(param.toPage().getSize());
         }
         //查询用户id和名字条件
@@ -282,12 +281,13 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
         //游戏获取
         Tuple2<String, List<Long>> gameTuple = gameAuthService.getUserGameList(param.getPitcherId());
         List<Long> gameIdList = gameTuple.getT2();
-        if (CollectionUtils.isEmpty(gameIdList)) {
-            return;
-        }
         //渠道获取
         Tuple2<List<Long>, List<AgentDTO>> tuple2 = agentService.getUserAgent(param.getAccountId(), param.getPitcherId(), param.getChannelId());
         List<Long> agentIds = tuple2.getT1();
+        //未获取到游戏或者渠道列表
+        if (CollectionUtils.isEmpty(gameIdList) || CollectionUtils.isEmpty(agentIds)) {
+            return;
+        }
         //渠道
         Map<Long, AgentDTO> agentMap = tuple2.getT2().stream().collect(Collectors.toMap(AgentDTO::getId, Function.identity()));
         //查询用户id和名字条件

+ 9 - 3
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/UserCardServiceImpl.java

@@ -7,6 +7,7 @@ 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.erp.security.util.SecurityUtil;
+import com.zanxiang.game.module.base.pojo.enums.GameAuthEnum;
 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;
@@ -57,12 +58,17 @@ public class UserCardServiceImpl extends ServiceImpl<UserCardMapper, UserCard> i
         //游戏获取
         Tuple2<String, List<Long>> gameTuple = gameAuthService.getUserGameList(null);
         List<Long> gameIdList = gameTuple.getT2();
-        if (!SecurityUtil.isAdmin() && CollectionUtils.isEmpty(gameIdList)) {
-            return new Page<>();
-        }
         //渠道获取
         Tuple2<List<Long>, List<AgentDTO>> tuple2 = agentService.getUserAgent(null, null, null);
         List<Long> agentIdList = tuple2.getT1();
+        if (CollectionUtils.isEmpty(gameIdList)) {
+            if (!SecurityUtil.isAdmin() || Objects.equals(gameTuple.getT1(), GameAuthEnum.MANAGE.getValue())) {
+                return new Page<>();
+            }
+        }
+        if (CollectionUtils.isEmpty(agentIdList)) {
+            return new Page<>();
+        }
         return page(param.toPage(), new QueryWrapper<UserCard>().lambda()
                 .in(!SecurityUtil.isAdmin(), UserCard::getGameId, gameIdList)
                 .in(CollectionUtils.isNotEmpty(agentIdList), UserCard::getAgentId, agentIdList)