|
@@ -217,6 +217,7 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements
|
|
|
//渠道列表
|
|
|
List<Agent> agentList;
|
|
|
List<AgentDTO> agentDTOList = new ArrayList<>();
|
|
|
+ boolean groupLeader = false;
|
|
|
//超管权限
|
|
|
if (SecurityUtil.isManager()) {
|
|
|
agentList = super.list(new LambdaQueryWrapper<Agent>()
|
|
@@ -228,6 +229,10 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements
|
|
|
List<Long> memberUserIdList = sysUserGroupRpc.memberUserId(SecurityUtil.getCompanyId(), SecurityUtil.getUserId()).getData();
|
|
|
//组长, 可查看自己或者组员数据
|
|
|
if (CollectionUtils.isNotEmpty(memberUserIdList)) {
|
|
|
+ groupLeader = true;
|
|
|
+ if (!memberUserIdList.contains(SecurityUtil.getUserId())) {
|
|
|
+ memberUserIdList.add(SecurityUtil.getUserId());
|
|
|
+ }
|
|
|
agentList = super.list(new LambdaQueryWrapper<Agent>()
|
|
|
.eq(Strings.isNotBlank(account), Agent::getAccountId, account)
|
|
|
.eq(Strings.isNotBlank(pitcherId), Agent::getCreateBy, pitcherId)
|
|
@@ -261,6 +266,10 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements
|
|
|
if (SecurityUtil.isManager() && Strings.isBlank(account) && Strings.isBlank(pitcherId) && agentId == null) {
|
|
|
agentIds.add(Agent.DEFAULT_AGENT);
|
|
|
}
|
|
|
+ //组长可见自然量
|
|
|
+ if (groupLeader && !agentIds.contains(Agent.DEFAULT_AGENT)) {
|
|
|
+ agentIds.add(Agent.DEFAULT_AGENT);
|
|
|
+ }
|
|
|
return Tuples.of(agentIds, agentDTOList);
|
|
|
}
|
|
|
|