|
|
@@ -38,6 +38,7 @@ import java.time.LocalDate;
|
|
|
import java.time.ZoneId;
|
|
|
import java.time.temporal.ChronoUnit;
|
|
|
import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
import java.util.stream.Stream;
|
|
|
|
|
|
@Service
|
|
|
@@ -216,7 +217,12 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
|
|
|
"selectPublicOrganizationCustomerCount", params, pageNo, pageSize);
|
|
|
List<CustomerListOut> list = (List<CustomerListOut>) page.getList();
|
|
|
list.forEach(e -> {
|
|
|
- if (e.getAid().equals(TokenManager.getAdminId())){
|
|
|
+ List<transferListBo> transferListBos = userTransferLogMapper.selectByUidGetList(e.getUid());
|
|
|
+ //去重获取aid的List
|
|
|
+ List<String> alist = transferListBos.stream().map(e2 -> e2.getAid()).distinct().collect(Collectors.toList());
|
|
|
+ //判定alist里面是否含有当前用户
|
|
|
+ boolean flag = alist.contains(TokenManager.getAdminId());
|
|
|
+ if (flag){
|
|
|
e.setMyUser(1);
|
|
|
}
|
|
|
});
|
|
|
@@ -260,9 +266,16 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
|
|
|
for (CustomerListOut c : l) {
|
|
|
if (null != c) {
|
|
|
if (null != c.getAid()) c.setAdminName(adminMapper.selectNameByid(c.getAid()));
|
|
|
- if (c.getAid().equals(TokenManager.getAdminId())) c.setMyUser(1);
|
|
|
if (null != c.getShareType() && c.getShareType().equals("1")) c.setAdminName("暂无");
|
|
|
if (null != c.getMid()) c.setInformationMaintainer(adminMapper.selectNameByid(c.getMid()));
|
|
|
+ List<transferListBo> transferListBos = userTransferLogMapper.selectByUidGetList(c.getUid());
|
|
|
+ //去重获取aid的List
|
|
|
+ List<String> alist = transferListBos.stream().map(e2 -> e2.getAid()).distinct().collect(Collectors.toList());
|
|
|
+ //判定alist里面是否含有当前用户
|
|
|
+ boolean flag = alist.contains(TokenManager.getAdminId());
|
|
|
+ if (flag){
|
|
|
+ c.setMyUser(1);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return p;
|