Jelajahi Sumber

fix : 权限修改完成!!!

bilingfeng 1 tahun lalu
induk
melakukan
c0a37c9f28

+ 1 - 1
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/ManageApplication.java

@@ -21,7 +21,7 @@ public class ManageApplication {
 
     public static void main(String[] args) {
         SpringApplication.run(ManageApplication.class, args);
-        System.out.println("赞象Manage服务启动成功 <权限修改提交222> ( ´・・)ノ(._.`) \n" +
+        System.out.println("赞象Manage服务启动成功 <权限修改提交修改完成!!!!!> ( ´・・)ノ(._.`) \n" +
                 "___  ___  ___   _   _   ___  _____  _____ \n" +
                 "|  \\/  | / _ \\ | \\ | | / _ \\|  __ \\|  ___|\n" +
                 "| .  . |/ /_\\ \\|  \\| |/ /_\\ \\ |  \\/| |__  \n" +

+ 10 - 7
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/AgentServiceImpl.java

@@ -226,7 +226,6 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements
         //判断是否是组长
         SysGameUserGroupRpcVO sysGameUserGroupRpcVO = sysGameUserGroupRpc.getByGroupUser(SecurityUtil.getCompanyId(),
                 SecurityUtil.getUserId()).getData();
-        log.error("判断是否是组长, sysGameUserGroupRpcVO : {}", JsonUtil.toString(sysGameUserGroupRpcVO));
         //判断运营
         GameAuthRole gameAuthRole = gameAuthRoleService.getOne(new LambdaQueryWrapper<GameAuthRole>()
                 .eq(GameAuthRole::getUserId, SecurityUtil.getUserId()));
@@ -264,7 +263,6 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements
             //组长权限, 获取组员id, 查询组内所有渠道
             Collection<Long> memberUserIdList = sysGameUserGroupRpc.memberUserIds(SecurityUtil.getCompanyId(),
                     SecurityUtil.getUserId()).getData();
-            log.error("获取组员信息, userId : {}, memberUserIdList : {}", SecurityUtil.getUserId(), JsonUtil.toString(memberUserIdList));
             agentList = super.list(new LambdaQueryWrapper<Agent>()
                     .eq(Strings.isNotBlank(account), Agent::getAccountId, account)
                     .eq(Strings.isNotBlank(pitcherId), Agent::getCreateBy, pitcherId)
@@ -298,13 +296,19 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements
 
     @Override
     public List<AgentAccountChoiceVO> agentAccountChoiceList() {
-        return super.list(new LambdaQueryWrapper<Agent>()
-                .eq(!SecurityUtil.isAdmin(), Agent::getCreateBy, SecurityUtil.getUserId())
-        ).stream().map(agent -> BeanUtil.copy(agent, AgentAccountChoiceVO.class)).collect(Collectors.toList());
+        return this.getUserAgentList().stream()
+                .map(agent -> BeanUtil.copy(agent, AgentAccountChoiceVO.class))
+                .collect(Collectors.toList());
     }
 
     @Override
     public List<AgentChoiceVO> agentChoiceList() {
+        return this.getUserAgentList().stream()
+                .map(agent -> BeanUtil.copy(agent, AgentChoiceVO.class))
+                .collect(Collectors.toList());
+    }
+
+    private List<Agent> getUserAgentList() {
         //判断是否是组长
         SysGameUserGroupRpcVO sysGameUserGroupRpcVO = sysGameUserGroupRpc.getByGroupUser(SecurityUtil.getCompanyId(),
                 SecurityUtil.getUserId()).getData();
@@ -340,8 +344,7 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements
         if (defaultAgent) {
             agentList.add(Agent.builder().id(Agent.DEFAULT_AGENT).agentName(Agent.DEFAULT_AGENT_NAME).build());
         }
-        //返回渠道列表
-        return agentList.stream().map(agent -> BeanUtil.copy(agent, AgentChoiceVO.class)).collect(Collectors.toList());
+        return agentList;
     }
 
     @Override