|
@@ -10,12 +10,10 @@ import com.gree.mall.manager.bean.workorder.IncreVO;
|
|
import com.gree.mall.manager.commonmapper.AdminMapper;
|
|
import com.gree.mall.manager.commonmapper.AdminMapper;
|
|
import com.gree.mall.manager.exception.RemoteServiceException;
|
|
import com.gree.mall.manager.exception.RemoteServiceException;
|
|
import com.gree.mall.manager.logic.common.CommonLogic;
|
|
import com.gree.mall.manager.logic.common.CommonLogic;
|
|
-import com.gree.mall.manager.plus.entity.AdminDept;
|
|
|
|
-import com.gree.mall.manager.plus.entity.AdminDeptWebsit;
|
|
|
|
-import com.gree.mall.manager.plus.entity.AdminUserWebsitRela;
|
|
|
|
-import com.gree.mall.manager.plus.entity.AdminWebsit;
|
|
|
|
|
|
+import com.gree.mall.manager.plus.entity.*;
|
|
import com.gree.mall.manager.plus.service.AdminDeptService;
|
|
import com.gree.mall.manager.plus.service.AdminDeptService;
|
|
import com.gree.mall.manager.plus.service.AdminDeptWebsitService;
|
|
import com.gree.mall.manager.plus.service.AdminDeptWebsitService;
|
|
|
|
+import com.gree.mall.manager.plus.service.AdminUserDeptRelaService;
|
|
import com.gree.mall.manager.zfire.bean.ZfireParamBean;
|
|
import com.gree.mall.manager.zfire.bean.ZfireParamBean;
|
|
import com.gree.mall.manager.zfire.util.FieldUtils;
|
|
import com.gree.mall.manager.zfire.util.FieldUtils;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -46,6 +44,10 @@ public class AdminDeptLogic {
|
|
AdminDeptWebsitService adminDeptWebsitService;
|
|
AdminDeptWebsitService adminDeptWebsitService;
|
|
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ AdminUserDeptRelaService adminUserDeptRelaService;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
public List<AdminDeptTree> tree(HttpServletRequest request) {
|
|
public List<AdminDeptTree> tree(HttpServletRequest request) {
|
|
|
|
|
|
@@ -118,6 +120,10 @@ public class AdminDeptLogic {
|
|
if (adminDeptWebsitService.lambdaQuery().eq(AdminDeptWebsit::getAdminDeptId,id).count() > 0)
|
|
if (adminDeptWebsitService.lambdaQuery().eq(AdminDeptWebsit::getAdminDeptId,id).count() > 0)
|
|
throw new RemoteServiceException("存在绑定网点");
|
|
throw new RemoteServiceException("存在绑定网点");
|
|
|
|
|
|
|
|
+ if (adminUserDeptRelaService.lambdaQuery().eq(AdminUserDeptRela::getAdminDeptId,id).count() > 0) {
|
|
|
|
+ throw new RemoteServiceException("存在绑定账号");
|
|
|
|
+ }
|
|
|
|
+
|
|
adminDeptService.removeById(id);
|
|
adminDeptService.removeById(id);
|
|
}
|
|
}
|
|
|
|
|