Commit 3b2200ad8062d6563d25e85c83dc974438d62cb0

Authored by YunaiV
1 parent 169c1e49

✨ 2.0.1 版本发布准备

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 26 /**
27 27 * 通过用户 ID 查询用户下属
28 28 *
29   - * @param userId 用户编号
  29 + * @param id 用户编号
30 30 * @return 用户下属用户列表
31 31 */
32   - List<AdminUserRespDTO> getUserListBySubordinate(Long userId);
  32 + List<AdminUserRespDTO> getUserListBySubordinate(Long id);
33 33  
34 34 /**
35 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 38 }
39 39  
40 40 @Override
41   - public List<AdminUserRespDTO> getUserListBySubordinate(Long userId) {
  41 + public List<AdminUserRespDTO> getUserListBySubordinate(Long id) {
42 42 // 1.1 获取用户负责的部门
43   - AdminUserDO user = userService.getUser(userId);
  43 + AdminUserDO user = userService.getUser(id);
44 44 if (user == null) {
45 45 return Collections.emptyList();
46 46 }
... ... @@ -49,7 +49,7 @@ public class AdminUserApiImpl implements AdminUserApi {
49 49 if (dept == null) {
50 50 return Collections.emptyList();
51 51 }
52   - if (ObjUtil.notEqual(dept.getLeaderUserId(), userId)) { // 校验为负责人
  52 + if (ObjUtil.notEqual(dept.getLeaderUserId(), id)) { // 校验为负责人
53 53 return Collections.emptyList();
54 54 }
55 55 deptIds.add(dept.getId());
... ... @@ -61,7 +61,7 @@ public class AdminUserApiImpl implements AdminUserApi {
61 61  
62 62 // 2. 获取部门对应的用户信息
63 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 65 return BeanUtils.toBean(users, AdminUserRespDTO.class);
66 66 }
67 67  
... ...