yangys
2024-10-29 d728f14a2f23cb477ebfecd33df5f7e5cb54a178
smart-man-boot/src/main/java/com/qianwen/smartman/modules/system/service/impl/DataScopeManagerServiceImpl.java
@@ -21,6 +21,7 @@
import com.qianwen.smartman.modules.cps.service.IEmployeeService;
import com.qianwen.smartman.modules.system.entity.Dept;
import com.qianwen.smartman.modules.system.entity.DeptScope;
import com.qianwen.smartman.modules.system.entity.UserDept;
import com.qianwen.smartman.modules.system.mapper.DeptMapper;
import com.qianwen.smartman.modules.system.service.IDataScopeManagerService;
import com.qianwen.smartman.modules.system.service.IDeptScopeService;
@@ -152,9 +153,7 @@
    }
    private void checkUsingDept(List<Long> deptId) {
        if (this.userDeptService.count(Lambda.in((v0) -> {
            return v0.getDeptId();
        }, deptId)) != 0) {
        if (this.userDeptService.count(Lambda.in(UserDept::getDeptId, deptId)) != 0) {
            throw new ServiceException("无法删除,账号绑定了该权限");
        }