|
|
|
@ -10,7 +10,6 @@ import com.ruoyi.common.core.domain.entity.SysDept;
|
|
|
|
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
|
|
|
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
|
|
|
|
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
|
|
|
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
|
|
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
|
@ -179,15 +178,12 @@ public class SysDeptServiceImpl extends ServicePlusImpl<SysDeptMapper, SysDept,
|
|
|
|
|
* @param deptId 部门id
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public void checkDeptDataScope(Long deptId)
|
|
|
|
|
{
|
|
|
|
|
if (!SysUser.isAdmin(SecurityUtils.getUserId()))
|
|
|
|
|
{
|
|
|
|
|
public void checkDeptDataScope(Long deptId) {
|
|
|
|
|
if (!SysUser.isAdmin(SecurityUtils.getUserId())) {
|
|
|
|
|
SysDept dept = new SysDept();
|
|
|
|
|
dept.setDeptId(deptId);
|
|
|
|
|
List<SysDept> depts = SpringUtils.getAopProxy(this).selectDeptList(dept);
|
|
|
|
|
if (StringUtils.isEmpty(depts))
|
|
|
|
|
{
|
|
|
|
|
if (StringUtils.isEmpty(depts)) {
|
|
|
|
|
throw new ServiceException("没有权限访问部门数据!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|