|
@@ -1018,7 +1018,7 @@ public class SysUserController {
|
|
|
|
|
|
HnqzUser user = SecurityUtils.getUser();
|
|
|
|
|
|
- Page<UserVO> userVosPage = userService.selectUserList(new Page<>(userDTO.getCurrent(), userDTO.getSize()), userDTO, user);
|
|
|
+ Page<UserVO> userVosPage = userService.selectUserList1(new Page<>(userDTO.getCurrent(), userDTO.getSize()), userDTO, user);
|
|
|
|
|
|
Set<Integer> userIds = userVosPage.getRecords().stream().map(UserVO::getUserId).collect(Collectors.toSet());
|
|
|
|
|
@@ -1050,24 +1050,24 @@ public class SysUserController {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- Map<Integer, List<SysCsmUserRelation>> csmParentUserMap = new HashMap<>();
|
|
|
- if (CollUtil.isNotEmpty(userIds)) {
|
|
|
- // 上级csm
|
|
|
- List<SysCsmUserRelation> csmUserRelations = sysCsmUserRelationMapper.selectList(Wrappers.<SysCsmUserRelation>lambdaQuery()
|
|
|
- .in(SysCsmUserRelation::getUserId, userIds));
|
|
|
- if (CollUtil.isNotEmpty(csmUserRelations)) {
|
|
|
- csmParentUserMap.putAll(csmUserRelations.stream().collect(Collectors.groupingBy(SysCsmUserRelation::getUserId)));
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- userVosPage.getRecords().forEach(userVO -> {
|
|
|
- // 上级csm
|
|
|
- List<SysCsmUserRelation> csmUserRelations = csmParentUserMap.get(userVO.getUserId());
|
|
|
- if (CollUtil.isNotEmpty(csmUserRelations)) {
|
|
|
- userVO.setParentIdList(csmUserRelations.stream().map(SysCsmUserRelation::getParentId).collect(Collectors.toList()));
|
|
|
- }
|
|
|
- });
|
|
|
+ //
|
|
|
+ // Map<Integer, List<SysCsmUserRelation>> csmParentUserMap = new HashMap<>();
|
|
|
+ // if (CollUtil.isNotEmpty(userIds)) {
|
|
|
+ // // 上级csm
|
|
|
+ // List<SysCsmUserRelation> csmUserRelations = sysCsmUserRelationMapper.selectList(Wrappers.<SysCsmUserRelation>lambdaQuery()
|
|
|
+ // .in(SysCsmUserRelation::getUserId, userIds));
|
|
|
+ // if (CollUtil.isNotEmpty(csmUserRelations)) {
|
|
|
+ // csmParentUserMap.putAll(csmUserRelations.stream().collect(Collectors.groupingBy(SysCsmUserRelation::getUserId)));
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // userVosPage.getRecords().forEach(userVO -> {
|
|
|
+ // // 上级csm
|
|
|
+ // List<SysCsmUserRelation> csmUserRelations = csmParentUserMap.get(userVO.getUserId());
|
|
|
+ // if (CollUtil.isNotEmpty(csmUserRelations)) {
|
|
|
+ // userVO.setParentIdList(csmUserRelations.stream().map(SysCsmUserRelation::getParentId).collect(Collectors.toList()));
|
|
|
+ // }
|
|
|
+ // });
|
|
|
|
|
|
return R.ok(userVosPage);
|
|
|
}
|