实现用户/角色服务.

This commit is contained in:
lijiahang
2023-07-17 18:23:06 +08:00
parent 9c3fd1ef6e
commit e7c1995dab
52 changed files with 635 additions and 1358 deletions

View File

@@ -41,11 +41,17 @@ public enum ErrorCode implements CodeInfo {
OTHER_DEVICE_LOGIN(700, "该账号于 {} 已在其他设备登陆 {}({})"),
USER_DISABLED(701, "当前用户已禁用"),
USER_LOCKED(702, "当前用户已被锁定"),
ROLE_PRESENT(703, "角色 [{}] 不存在"),
// -------------------- 自定义 - 通用 --------------------
NETWORK_FLUCTUATION(900, "当前环境网路波动"),
HTTP_API(901, "api 调用异常"),
HTTP_API_REQUEST_ERROR(901, "api 调用异常"),
IO_EXCEPTION(902, "网络异常"),
@@ -75,6 +81,8 @@ public enum ErrorCode implements CodeInfo {
DIABLED_ERROR(915, "数据已被禁用"),
UNSUPPOETED(916, "不支持此操作"),
;
ErrorCode(int code, String message) {

View File

@@ -13,7 +13,7 @@ public interface ErrorMessage {
String ID_MISSING = "id 不能为空";
String INVALID_PARAM = "参数错误";
String INVALID_PARAM = "参数验证失败";
String DATA_PRESENT = "数据已存在";
@@ -21,12 +21,20 @@ public interface ErrorMessage {
String CODE_PRESENT = "编码已存在";
String NICKNAME_PRESENT = "花名已存在";
String USERNAME_PRESENT = "用户名已存在";
String ROLE_ABSENT = "角色已存在";
String DATA_ABSENT = "数据不存在";
String USERNAME_PASSWORD_ERROR = "用户名或密码错误";
String MAX_LOGIN_FAILED = "登陆失败次数已上限";
String USER_ABSENT = "用户不存在";
String USER_DISABLED = "用户已被禁用";
String USER_LOCKED = "用户已被锁定";