|
@@ -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
|