|
@@ -4,6 +4,7 @@
|
|
package com.jeeplus.sys.controller;
|
|
package com.jeeplus.sys.controller;
|
|
|
|
|
|
|
|
|
|
|
|
+import cn.hutool.core.collection.CollectionUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.extra.spring.SpringUtil;
|
|
import cn.hutool.extra.spring.SpringUtil;
|
|
@@ -238,7 +239,17 @@ public class UserController {
|
|
|
|
|
|
QueryWrapper <UserDTO> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( userDTO, UserDTO.class );
|
|
QueryWrapper <UserDTO> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( userDTO, UserDTO.class );
|
|
// 管理员查询不限制
|
|
// 管理员查询不限制
|
|
- if (!UserUtils.getCurrentUserDTO().isAdmin()) {
|
|
|
|
|
|
+ Boolean isAdmin = false;
|
|
|
|
+ UserDTO currentUserDTO = UserUtils.getCurrentUserDTO();
|
|
|
|
+ if (currentUserDTO != null && CollectionUtil.isNotEmpty(currentUserDTO.getRoleDTOList())){
|
|
|
|
+ for (RoleDTO roleDTO : currentUserDTO.getRoleDTOList()) {
|
|
|
|
+ if (roleDTO.getEnName().equals("sys")){
|
|
|
|
+ isAdmin = true;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (!isAdmin) {
|
|
queryWrapper.isNull("a.is_admin");
|
|
queryWrapper.isNull("a.is_admin");
|
|
if (ObjectUtil.isNotEmpty(userDTO)){
|
|
if (ObjectUtil.isNotEmpty(userDTO)){
|
|
if (ObjectUtil.isNotEmpty(userDTO.getCompanyDTO()) && ObjectUtil.isNotEmpty(userDTO.getOfficeDTO())) {
|
|
if (ObjectUtil.isNotEmpty(userDTO.getCompanyDTO()) && ObjectUtil.isNotEmpty(userDTO.getOfficeDTO())) {
|