| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.common.cache.SysCache; |
| | | import org.springblade.common.node.TreeStringNode; |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.common.utils.AuthUtils; |
| | | import org.springblade.common.utils.NodeTreeUtil; |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.constant.BladeConstant; |
| | |
| | | import org.springblade.modules.system.entity.Region; |
| | | import org.springblade.modules.system.mapper.DeptMapper; |
| | | import org.springblade.modules.system.node.DeptUserTreeNode; |
| | | import org.springblade.modules.system.node.TreeNode; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.IRegionService; |
| | | import org.springblade.modules.system.vo.DeptDetailVO; |
| | | import org.springblade.modules.system.vo.DeptVO; |
| | | import org.springblade.modules.system.wrapper.DeptWrapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Comparator; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | |
| | | parentId = 0L; |
| | | } |
| | | // 判断数据权限控制,非超管角色只可看到本级及以下数据 |
| | | if (Func.toLong(parentId) == 0L && !AuthUtil.isAdministrator()) { |
| | | if (Func.toLong(parentId) == 0L && !AuthUtils.isAdministratorOrAdmin(AuthUtil.getUserRole())) { |
| | | Long deptId = Func.firstLong(AuthUtil.getDeptId()); |
| | | Dept dept = SysCache.getDept(deptId); |
| | | if (dept != null && dept.getParentId() != 0) { |