|
@@ -6,7 +6,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.google.code.kaptcha.impl.DefaultKaptcha;
|
|
import com.google.code.kaptcha.impl.DefaultKaptcha;
|
|
import com.gree.mall.manager.bean.ExcelData;
|
|
import com.gree.mall.manager.bean.ExcelData;
|
|
import com.gree.mall.manager.bean.SVerification;
|
|
import com.gree.mall.manager.bean.SVerification;
|
|
-import com.gree.mall.manager.bean.admin.*;
|
|
|
|
|
|
+import com.gree.mall.manager.bean.admin.AdminModuleTree;
|
|
|
|
+import com.gree.mall.manager.bean.admin.AdminUserBean;
|
|
|
|
+import com.gree.mall.manager.bean.admin.AdminUserCom;
|
|
|
|
+import com.gree.mall.manager.bean.admin.AdminWebsitGrantBean;
|
|
import com.gree.mall.manager.bean.admin.reqDto.AdminUserAddReqBean;
|
|
import com.gree.mall.manager.bean.admin.reqDto.AdminUserAddReqBean;
|
|
import com.gree.mall.manager.bean.admin.respDto.AdminCompanyWechatRespPageBean;
|
|
import com.gree.mall.manager.bean.admin.respDto.AdminCompanyWechatRespPageBean;
|
|
import com.gree.mall.manager.commonmapper.AdminMapper;
|
|
import com.gree.mall.manager.commonmapper.AdminMapper;
|
|
@@ -212,6 +215,10 @@ public class AdminUserLogic {
|
|
if (!StringUtil.isEmpty(adminUser.getAdminWebsitId())) {
|
|
if (!StringUtil.isEmpty(adminUser.getAdminWebsitId())) {
|
|
AdminWebsit adminWebsit = adminWebsitService.getById(adminUser.getAdminWebsitId());
|
|
AdminWebsit adminWebsit = adminWebsitService.getById(adminUser.getAdminWebsitId());
|
|
|
|
|
|
|
|
+ if (adminWebsit.getType().equals(AdminWebsitTypeEnum.A.getKey()) && curAdminUser.getType() != 2) {
|
|
|
|
+ throw new RemoteServiceException("当前账号非“平台”类型不能创建平台账号");
|
|
|
|
+ }
|
|
|
|
+
|
|
//非平台账号
|
|
//非平台账号
|
|
if (!StringUtils.equals(adminWebsit.getType(), AdminWebsitTypeEnum.A.getKey())) {
|
|
if (!StringUtils.equals(adminWebsit.getType(), AdminWebsitTypeEnum.A.getKey())) {
|
|
adminUser.setCompanyWechatId(adminWebsit.getCompanyWechatId());
|
|
adminUser.setCompanyWechatId(adminWebsit.getCompanyWechatId());
|
|
@@ -314,6 +321,10 @@ public class AdminUserLogic {
|
|
throw new RemoteServiceException("请选择部门");
|
|
throw new RemoteServiceException("请选择部门");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (adminWebsit.getType().equals(AdminWebsitTypeEnum.A.getKey()) && admin.getType() != 2) {
|
|
|
|
+ throw new RemoteServiceException("当前账号非“平台”类型不能创建平台账号");
|
|
|
|
+ }
|
|
|
|
+
|
|
if (admin.getType() == 0 && !StringUtils.equals(adminWebsit.getType(), AdminWebsitTypeEnum.C.getKey())) {
|
|
if (admin.getType() == 0 && !StringUtils.equals(adminWebsit.getType(), AdminWebsitTypeEnum.C.getKey())) {
|
|
throw new RemoteServiceException("网点账号请选择普通网点");
|
|
throw new RemoteServiceException("网点账号请选择普通网点");
|
|
}
|
|
}
|