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