|
@@ -206,15 +206,16 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements
|
|
|
|
|
|
@Override
|
|
|
public Tuple2<List<Long>, List<AgentDTO>> getUserAgent(String account, String pitcherId, Long agentId) {
|
|
|
+ //组成员列表
|
|
|
+ List<Long> memberUserIdList = sysUserGroupRpc.memberUserId(SecurityUtil.getCompanyId(), SecurityUtil.getUserId()).getData();
|
|
|
//自然量查询
|
|
|
if (Objects.equals(agentId, Agent.DEFAULT_AGENT)) {
|
|
|
- //管理员
|
|
|
- if (SecurityUtil.isManager()) {
|
|
|
+ //判断管理员或者组长
|
|
|
+ if (SecurityUtil.isManager() || CollectionUtils.isNotEmpty(memberUserIdList)) {
|
|
|
return Tuples.of(Collections.singletonList(Agent.DEFAULT_AGENT), Collections.emptyList());
|
|
|
- } else {
|
|
|
- //非管理员不允许查询自然量
|
|
|
- return Tuples.of(Collections.emptyList(), Collections.emptyList());
|
|
|
}
|
|
|
+ //非管理员或者组长不允许查询自然量
|
|
|
+ return Tuples.of(Collections.emptyList(), Collections.emptyList());
|
|
|
}
|
|
|
//渠道列表
|
|
|
List<Agent> agentList;
|
|
@@ -227,8 +228,6 @@ public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements
|
|
|
.eq(Strings.isNotBlank(pitcherId), Agent::getCreateBy, pitcherId)
|
|
|
.eq(agentId != null, Agent::getId, agentId));
|
|
|
} else {
|
|
|
- //判断是否是组长
|
|
|
- List<Long> memberUserIdList = sysUserGroupRpc.memberUserId(SecurityUtil.getCompanyId(), SecurityUtil.getUserId()).getData();
|
|
|
//组长, 可查看自己或者组员数据
|
|
|
if (CollectionUtils.isNotEmpty(memberUserIdList)) {
|
|
|
groupLeader = true;
|