‘linchangsheng’ hace 11 meses
padre
commit
6922929e68

+ 6 - 0
mall-server-api/src/main/java/com/gree/mall/manager/logic/admin/AdminDeptLogic.java

@@ -130,6 +130,12 @@ public class AdminDeptLogic {
     }
 
     public void delWebsit(String adminDeptWebsitId) {
+        AdminDeptWebsit adminDeptWebsit = adminDeptWebsitService.getById(adminDeptWebsitId);
+
+        AdminDept adminDept = adminDeptService.getById(adminDeptWebsit.getAdminDeptId());
+        if (adminDept.getPId().equals("0"))
+            throw new RemoteServiceException("商户不能删除绑定网点");
+
         adminDeptWebsitService.removeById(adminDeptWebsitId);
     }