fix: 用户管理显示问题
This commit is contained in:
@@ -31,6 +31,7 @@ import org.nl.modules.system.service.dto.UserQueryCriteria;
|
|||||||
import org.nl.utils.PageUtil;
|
import org.nl.utils.PageUtil;
|
||||||
import org.nl.utils.RsaUtils;
|
import org.nl.utils.RsaUtils;
|
||||||
import org.nl.common.utils.UserInfoUtil;
|
import org.nl.common.utils.UserInfoUtil;
|
||||||
|
import org.nl.utils.SecurityUtils;
|
||||||
import org.nl.utils.enums.CodeEnum;
|
import org.nl.utils.enums.CodeEnum;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
@@ -83,7 +84,7 @@ public class UserController {
|
|||||||
criteria.getDeptIds().addAll(deptService.getDeptChildren(deptService.findByPid(criteria.getDeptId())));
|
criteria.getDeptIds().addAll(deptService.getDeptChildren(deptService.findByPid(criteria.getDeptId())));
|
||||||
}
|
}
|
||||||
// 数据权限
|
// 数据权限
|
||||||
List<Long> dataScopes = dataService.getDeptIds(userService.findByName(UserInfoUtil.getNickName()));
|
List<Long> dataScopes = dataService.getDeptIds(userService.findByName(SecurityUtils.getCurrentUsername()));
|
||||||
// criteria.getDeptIds() 不为空并且数据权限不为空则取交集
|
// criteria.getDeptIds() 不为空并且数据权限不为空则取交集
|
||||||
if (!CollectionUtils.isEmpty(criteria.getDeptIds()) && !CollectionUtils.isEmpty(dataScopes)){
|
if (!CollectionUtils.isEmpty(criteria.getDeptIds()) && !CollectionUtils.isEmpty(dataScopes)){
|
||||||
// 取交集
|
// 取交集
|
||||||
|
|||||||
Reference in New Issue
Block a user