|
@@ -335,8 +335,8 @@ public class AdminUserLogic {
|
|
|
if ((curAdminUser.getType() == 1 && !curAdminUser.getIsMaster()) || (curAdminUser.getType() == 0 && !curAdminUser.getIsMaster())) {
|
|
|
throw new RemoteServiceException("账号有”归属网点“属性,超级管理员或商户主账号或网点主账号才有重置密码的权限");
|
|
|
}
|
|
|
- } else if (resetAdminUser.getType() == 0 && curAdminUser.getType() == 1 && !curAdminUser.getIsMaster()) {
|
|
|
- throw new RemoteServiceException("“网点账号”,超级管理员或商户主账号才有重置密码的权限");
|
|
|
+// } else if (resetAdminUser.getType() == 0 && curAdminUser.getType() == 1 && !curAdminUser.getIsMaster()) {
|
|
|
+// throw new RemoteServiceException("“网点账号”,超级管理员或商户主账号才有重置密码的权限");
|
|
|
} else if (resetAdminUser.getType() == 1 && !curAdminUser.getIsMaster()) {
|
|
|
throw new RemoteServiceException("“商户账号”,超级管理员或商户主账号才有重置密码的权限");
|
|
|
}
|
|
@@ -358,16 +358,16 @@ public class AdminUserLogic {
|
|
|
if (StringUtils.isBlank(adminUser.getUserName()) || StringUtils.isBlank(adminUser.getPassword())) {
|
|
|
throw new RemoteServiceException("参数错误");
|
|
|
}
|
|
|
- if (Objects.nonNull(adminUser.getIsVender())
|
|
|
- && adminUser.getIsVender()
|
|
|
- && StringUtils.isBlank(adminUser.getVenderId())) {
|
|
|
- throw new RemoteServiceException("请选择供应商");
|
|
|
- }
|
|
|
// 网点账号供应商不能选
|
|
|
if (curAdminUser.getType() == 0) {
|
|
|
adminUser.setIsVender(false)
|
|
|
.setVenderId(null);
|
|
|
}
|
|
|
+ if (Objects.nonNull(adminUser.getIsVender())
|
|
|
+ && adminUser.getIsVender()
|
|
|
+ && StringUtils.isBlank(adminUser.getVenderId())) {
|
|
|
+ throw new RemoteServiceException("请选择供应商");
|
|
|
+ }
|
|
|
Integer count = adminUserService.lambdaQuery().eq(AdminUser::getUserName, adminUser.getUserName()).count();
|
|
|
if (count > 0) {
|
|
|
throw new RemoteServiceException("帐号已被注册");
|