2.0.1 版本发布准备

This commit is contained in:
YunaiV 2024-02-17 23:26:50 +08:00
parent 169c1e4907
commit 3b2200ad80
2 changed files with 6 additions and 6 deletions

View File

@ -26,10 +26,10 @@ public interface AdminUserApi {
/**
* 通过用户 ID 查询用户下属
*
* @param userId 用户编号
* @param id 用户编号
* @return 用户下属用户列表
*/
List<AdminUserRespDTO> getUserListBySubordinate(Long userId);
List<AdminUserRespDTO> getUserListBySubordinate(Long id);
/**
* 通过用户 ID 查询用户们

View File

@ -38,9 +38,9 @@ public class AdminUserApiImpl implements AdminUserApi {
}
@Override
public List<AdminUserRespDTO> getUserListBySubordinate(Long userId) {
public List<AdminUserRespDTO> getUserListBySubordinate(Long id) {
// 1.1 获取用户负责的部门
AdminUserDO user = userService.getUser(userId);
AdminUserDO user = userService.getUser(id);
if (user == null) {
return Collections.emptyList();
}
@ -49,7 +49,7 @@ public class AdminUserApiImpl implements AdminUserApi {
if (dept == null) {
return Collections.emptyList();
}
if (ObjUtil.notEqual(dept.getLeaderUserId(), userId)) { // 校验为负责人
if (ObjUtil.notEqual(dept.getLeaderUserId(), id)) { // 校验为负责人
return Collections.emptyList();
}
deptIds.add(dept.getId());
@ -61,7 +61,7 @@ public class AdminUserApiImpl implements AdminUserApi {
// 2. 获取部门对应的用户信息
List<AdminUserDO> users = userService.getUserListByDeptIds(deptIds);
users.removeIf(item -> ObjUtil.equal(item.getId(), userId)); // 排除自己
users.removeIf(item -> ObjUtil.equal(item.getId(), id)); // 排除自己
return BeanUtils.toBean(users, AdminUserRespDTO.class);
}