fix(系统设置): 用户创建存在重复邮箱时报错处理

This commit is contained in:
Jianguo-Genius 2024-07-22 17:58:47 +08:00 committed by 刘瑞斌
parent 4152e6fded
commit 2599daeee2
1 changed files with 1 additions and 0 deletions

View File

@ -126,6 +126,7 @@ public class SimpleUserService {
Map<String, String> errorEmails = this.validateUserInfo(userCreateDTO.getUserInfoList().stream().map(UserCreateInfo::getEmail).toList());
if (MapUtils.isNotEmpty(errorEmails)) {
response.setErrorEmails(errorEmails);
throw new MSException(SystemResultCode.INVITE_EMAIL_EXIST, JSON.toJSONString(errorEmails.keySet()));
} else {
response.setSuccessList(this.saveUserAndRole(userCreateDTO, source, operator, "/system/user/addUser"));
}