refactor(系统设置): 优化系统用户邮箱邀请时邮箱重复的接口报错信息
This commit is contained in:
parent
95d103040c
commit
1d148639a3
|
@ -9,6 +9,7 @@ public enum SystemResultCode implements IResultCode {
|
|||
|
||||
USER_TOO_MANY(101511, "User too many"),
|
||||
DEPT_USER_TOO_MANY(101512, "Department user too many"),
|
||||
INVITE_EMAIL_EXIST(101513, "user_email_already_exists"),
|
||||
|
||||
/**
|
||||
* 调用获取全局用户组接口,如果操作的是非全局的用户组,会返回该响应码
|
||||
|
|
|
@ -430,7 +430,7 @@ public class SimpleUserService {
|
|||
//校验邮箱和角色的合法性
|
||||
Map<String, String> errorMap = this.validateUserInfo(request.getInviteEmails());
|
||||
if (MapUtils.isNotEmpty(errorMap)) {
|
||||
throw new MSException(Translator.get("user.email.repeat") + " : " + StringUtils.join(errorMap.keySet(), ", "));
|
||||
throw new MSException(SystemResultCode.INVITE_EMAIL_EXIST, JSON.toJSONString(errorMap.keySet()));
|
||||
}
|
||||
List<UserInvite> inviteList = userInviteService.batchInsert(request.getInviteEmails(), inviteUser.getId(), request.getUserRoleIds());
|
||||
//记录日志
|
||||
|
|
Loading…
Reference in New Issue