Browse Source

no message

FengChaoYu 3 weeks ago
parent
commit
bec2694a30

+ 4 - 1
src/main/java/com/gree/mall/manager/logic/admin/AdminUserLogic.java

@@ -220,11 +220,14 @@ public class AdminUserLogic {
             if (CollectionUtil.isEmpty(adminUser.getPermissions())) {
                 throw new RemoteServiceException("账号类型为“商家账号”, 请选择至少1个商家");
             }
+            if (curLoginAmin.getType() == 4 && !adminUser.getType().equals(curLoginAmin.getType())) {
+                throw new RemoteServiceException("操作者账号类型为“商家账号”, 只能操作选择“商家账号”");
+            }
         } else if (curLoginAmin.getType() == 1 || curLoginAmin.getType() == 3) {
             // 如果创建人账号是商户, 所建账号为“商户类型”或“商家类型”
             if (adminUser.getType() == 0) {
                 // 创建人账号不能选择平台
-                throw new RemoteServiceException("创建者不能选择账号类型为“平台账号”");
+                throw new RemoteServiceException("操作者不能选择账号类型为“平台账号”");
             }
             if (CollectionUtil.isEmpty(adminUser.getDeptList()) && CollectionUtil.isEmpty(adminUser.getPermissions())) {
                 throw new RemoteServiceException("账号类型为“商户账号”, 请选择至少1个部门或者1个商家");