!295 fix & improve

Merge pull request !295 from OceansDeep/pg
This commit is contained in:
OceansDeep 2023-06-16 09:01:20 +00:00 committed by Gitee
commit 007b145c2e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 1 deletions

View File

@ -511,6 +511,7 @@ public enum ResultCode {
CONNECT_NOT_EXIST(90000, "登录方式不存在!"),
ELASTICSEARCH_INDEX_INIT_ERROR(90003, "索引初始化失败!"),
PURCHASE_ORDER_DEADLINE_ERROR(90004, "供求单,已超过报名截止时间"),
USER_ADD_ERROR(90005, "用户添加失败"),
INDEX_BUILDING(90005, "索引正在生成");

View File

@ -168,10 +168,11 @@ public class AdminUserManagerController {
throw new ServiceException(ResultCode.PERMISSION_BEYOND_TEN);
}
adminUserService.saveAdminUser(adminUser, roles);
return ResultUtil.success();
} catch (Exception e) {
log.error("添加用户错误", e);
return ResultUtil.error(ResultCode.USER_ADD_ERROR);
}
return ResultUtil.success();
}
@PutMapping(value = "/enable/{userId}")