Commit 3b2200ad8062d6563d25e85c83dc974438d62cb0
1 parent
169c1e49
✨ 2.0.1 版本发布准备
Showing
2 changed files
with
6 additions
and
6 deletions
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApi.java
| @@ -26,10 +26,10 @@ public interface AdminUserApi { | @@ -26,10 +26,10 @@ public interface AdminUserApi { | ||
| 26 | /** | 26 | /** |
| 27 | * 通过用户 ID 查询用户下属 | 27 | * 通过用户 ID 查询用户下属 |
| 28 | * | 28 | * |
| 29 | - * @param userId 用户编号 | 29 | + * @param id 用户编号 |
| 30 | * @return 用户下属用户列表 | 30 | * @return 用户下属用户列表 |
| 31 | */ | 31 | */ |
| 32 | - List<AdminUserRespDTO> getUserListBySubordinate(Long userId); | 32 | + List<AdminUserRespDTO> getUserListBySubordinate(Long id); |
| 33 | 33 | ||
| 34 | /** | 34 | /** |
| 35 | * 通过用户 ID 查询用户们 | 35 | * 通过用户 ID 查询用户们 |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java
| @@ -38,9 +38,9 @@ public class AdminUserApiImpl implements AdminUserApi { | @@ -38,9 +38,9 @@ public class AdminUserApiImpl implements AdminUserApi { | ||
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | @Override | 40 | @Override |
| 41 | - public List<AdminUserRespDTO> getUserListBySubordinate(Long userId) { | 41 | + public List<AdminUserRespDTO> getUserListBySubordinate(Long id) { |
| 42 | // 1.1 获取用户负责的部门 | 42 | // 1.1 获取用户负责的部门 |
| 43 | - AdminUserDO user = userService.getUser(userId); | 43 | + AdminUserDO user = userService.getUser(id); |
| 44 | if (user == null) { | 44 | if (user == null) { |
| 45 | return Collections.emptyList(); | 45 | return Collections.emptyList(); |
| 46 | } | 46 | } |
| @@ -49,7 +49,7 @@ public class AdminUserApiImpl implements AdminUserApi { | @@ -49,7 +49,7 @@ public class AdminUserApiImpl implements AdminUserApi { | ||
| 49 | if (dept == null) { | 49 | if (dept == null) { |
| 50 | return Collections.emptyList(); | 50 | return Collections.emptyList(); |
| 51 | } | 51 | } |
| 52 | - if (ObjUtil.notEqual(dept.getLeaderUserId(), userId)) { // 校验为负责人 | 52 | + if (ObjUtil.notEqual(dept.getLeaderUserId(), id)) { // 校验为负责人 |
| 53 | return Collections.emptyList(); | 53 | return Collections.emptyList(); |
| 54 | } | 54 | } |
| 55 | deptIds.add(dept.getId()); | 55 | deptIds.add(dept.getId()); |
| @@ -61,7 +61,7 @@ public class AdminUserApiImpl implements AdminUserApi { | @@ -61,7 +61,7 @@ public class AdminUserApiImpl implements AdminUserApi { | ||
| 61 | 61 | ||
| 62 | // 2. 获取部门对应的用户信息 | 62 | // 2. 获取部门对应的用户信息 |
| 63 | List<AdminUserDO> users = userService.getUserListByDeptIds(deptIds); | 63 | List<AdminUserDO> users = userService.getUserListByDeptIds(deptIds); |
| 64 | - users.removeIf(item -> ObjUtil.equal(item.getId(), userId)); // 排除自己 | 64 | + users.removeIf(item -> ObjUtil.equal(item.getId(), id)); // 排除自己 |
| 65 | return BeanUtils.toBean(users, AdminUserRespDTO.class); | 65 | return BeanUtils.toBean(users, AdminUserRespDTO.class); |
| 66 | } | 66 | } |
| 67 | 67 |