update 优化命名含义

This commit is contained in:
AprilWind 2025-07-02 11:41:53 +08:00
parent 6816b45b11
commit 89cd225f17
5 changed files with 6 additions and 6 deletions

View File

@ -79,7 +79,7 @@ public interface SysDeptMapper extends BaseMapperPlus<SysDept, SysDeptVo> {
* @param parentId 父部门ID
* @return 部门ID集合
*/
default List<Long> getAllDeptIds(Long parentId) {
default List<Long> selectDeptAndChildById(Long parentId) {
List<SysDept> deptList = this.selectListByParentId(parentId);
List<Long> deptIds = StreamUtils.toList(deptList, SysDept::getDeptId);
deptIds.add(parentId);

View File

@ -65,7 +65,7 @@ public class SysDataScopeServiceImpl implements ISysDataScopeService {
if (ObjectUtil.isNull(deptId)) {
return "-1";
}
List<Long> deptIds = deptMapper.getAllDeptIds(deptId);
List<Long> deptIds = deptMapper.selectDeptAndChildById(deptId);
return CollUtil.isNotEmpty(deptIds) ? StreamUtils.join(deptIds, Convert::toStr) : "-1";
}

View File

@ -107,7 +107,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
if (ObjectUtil.isNotNull(bo.getBelongDeptId())) {
//部门树搜索
lqw.and(x -> {
List<Long> deptIds = baseMapper.getAllDeptIds(bo.getBelongDeptId());
List<Long> deptIds = baseMapper.selectDeptAndChildById(bo.getBelongDeptId());
x.in(SysDept::getDeptId, deptIds);
});
}

View File

@ -91,7 +91,7 @@ public class SysPostServiceImpl implements ISysPostService, PostService {
} else if (ObjectUtil.isNotNull(bo.getBelongDeptId())) {
//部门树搜索
wrapper.and(x -> {
List<Long> deptIds = deptMapper.getAllDeptIds(bo.getBelongDeptId());
List<Long> deptIds = deptMapper.selectDeptAndChildById(bo.getBelongDeptId());
x.in(SysPost::getDeptId, deptIds);
});
}

View File

@ -81,7 +81,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
.between(params.get("beginTime") != null && params.get("endTime") != null,
"u.create_time", params.get("beginTime"), params.get("endTime"))
.and(ObjectUtil.isNotNull(user.getDeptId()), w -> {
List<Long> deptIds = deptMapper.getAllDeptIds(user.getDeptId());
List<Long> deptIds = deptMapper.selectDeptAndChildById(user.getDeptId());
w.in("u.dept_id", deptIds);
}).orderByAsc("u.user_id");
return baseMapper.selectUserExportList(wrapper);
@ -100,7 +100,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
.between(params.get("beginTime") != null && params.get("endTime") != null,
SysUser::getCreateTime, params.get("beginTime"), params.get("endTime"))
.and(ObjectUtil.isNotNull(user.getDeptId()), w -> {
List<Long> ids = deptMapper.getAllDeptIds(user.getDeptId());
List<Long> ids = deptMapper.selectDeptAndChildById(user.getDeptId());
w.in(SysUser::getDeptId, ids);
}).orderByAsc(SysUser::getUserId);
if (StringUtils.isNotBlank(user.getExcludeUserIds())) {