mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-18 09:35:29 +08:00
update 优化命名含义
This commit is contained in:
parent
6816b45b11
commit
89cd225f17
@ -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);
|
||||
|
||||
@ -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";
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
@ -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())) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user