fix(系统设置): 用户创建存在重复邮箱时报错处理
This commit is contained in:
parent
4152e6fded
commit
2599daeee2
|
@ -126,6 +126,7 @@ public class SimpleUserService {
|
||||||
Map<String, String> errorEmails = this.validateUserInfo(userCreateDTO.getUserInfoList().stream().map(UserCreateInfo::getEmail).toList());
|
Map<String, String> errorEmails = this.validateUserInfo(userCreateDTO.getUserInfoList().stream().map(UserCreateInfo::getEmail).toList());
|
||||||
if (MapUtils.isNotEmpty(errorEmails)) {
|
if (MapUtils.isNotEmpty(errorEmails)) {
|
||||||
response.setErrorEmails(errorEmails);
|
response.setErrorEmails(errorEmails);
|
||||||
|
throw new MSException(SystemResultCode.INVITE_EMAIL_EXIST, JSON.toJSONString(errorEmails.keySet()));
|
||||||
} else {
|
} else {
|
||||||
response.setSuccessList(this.saveUserAndRole(userCreateDTO, source, operator, "/system/user/addUser"));
|
response.setSuccessList(this.saveUserAndRole(userCreateDTO, source, operator, "/system/user/addUser"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue