Explorar el Código

fix : 权限修改提交322

bilingfeng hace 1 año
padre
commit
abe085b043

+ 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服务启动成功 <权限修改提交3> ( ´・・)ノ(._.`) \n" +
+        System.out.println("赞象Manage服务启动成功 <权限修改提交3222> ( ´・・)ノ(._.`) \n" +
                 "___  ___  ___   _   _   ___  _____  _____ \n" +
                 "|  \\/  | / _ \\ | \\ | | / _ \\|  __ \\|  ___|\n" +
                 "| .  . |/ /_\\ \\|  \\| |/ /_\\ \\ |  \\/| |__  \n" +

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

@@ -214,6 +214,9 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements
     public Tuple2<List<Long>, List<AgentDTO>> getUserAgent(String account, String pitcherId, Long agentId) {
         //组成员列表
         List<Long> memberUserIdList = sysUserGroupRpc.memberUserId(SecurityUtil.getCompanyId(), SecurityUtil.getUserId()).getData();
+
+        log.error("查询组员 userId : {}, list : {}", SecurityUtil.getUserId(), JsonUtil.toString(memberUserIdList));
+
         //自然量查询
         if (Objects.equals(agentId, Agent.DEFAULT_AGENT)) {
             //判断管理员或者组长
@@ -292,7 +295,12 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements
         List<AgentChoiceVO> choiceVOList = super.list(new LambdaQueryWrapper<Agent>()
                 .eq(!SecurityUtil.isAdmin(), Agent::getCreateBy, SecurityUtil.getUserId())
         ).stream().map(agent -> BeanUtil.copy(agent, AgentChoiceVO.class)).collect(Collectors.toList());
-        choiceVOList.add(AgentChoiceVO.builder().id(Agent.DEFAULT_AGENT).agentName(Agent.DEFAULT_AGENT_NAME).build());
+
+        //组成员列表
+        List<Long> memberUserIdList = sysUserGroupRpc.memberUserId(SecurityUtil.getCompanyId(), SecurityUtil.getUserId()).getData();
+        if (CollectionUtils.isNotEmpty(memberUserIdList)) {
+            choiceVOList.add(AgentChoiceVO.builder().id(Agent.DEFAULT_AGENT).agentName(Agent.DEFAULT_AGENT_NAME).build());
+        }
         return choiceVOList;
     }