TASK: 全局异常处理,代码优化,测试数据库连接信息变更;

This commit is contained in:
shahaibo
2023-10-27 10:09:19 +08:00
parent 9fa605f83e
commit bedc640e13
27 changed files with 377 additions and 242 deletions

View File

@@ -1,31 +1,31 @@
package com.ai.da.common.enums;
import java.util.stream.Stream;
/**
* @author: yanglei
* @description: 操作类型 登入 忘记密码
* @create: 2022-8-10 17:33
**/
public enum OperationTypeEnum {
/**
* 登入
*/
LOGIN,
/**
* 异常ip
*/
EXCEPTION_IP,
/**
* 绑定邮箱
*/
BIND_MAILBOX,
/**
* 忘记密码
*/
FORGET_PWD;
public static OperationTypeEnum of(String name) {
return Stream.of(OperationTypeEnum.values()).filter(v -> v.name().equals(name)).findFirst().orElse(null);
}
}
package com.ai.da.common.enums;
import java.util.stream.Stream;
/**
* @author: yanglei
* @description: 操作类型 登入 忘记密码
* @create: 2022-8-10 17:33
**/
public enum AuthenticationOperationTypeEnum {
/**
* 登入
*/
LOGIN,
/**
* 异常ip
*/
EXCEPTION_IP,
/**
* 绑定邮箱
*/
BIND_MAILBOX,
/**
* 忘记密码
*/
FORGET_PWD;
public static AuthenticationOperationTypeEnum of(String name) {
return Stream.of(AuthenticationOperationTypeEnum.values()).filter(v -> v.name().equals(name)).findFirst().orElse(null);
}
}

View File

@@ -28,6 +28,8 @@ public enum SwitchCategoryEnum {
* 裤子
*/
TROUSERS("Trousers"),
TOPS("Tops"),
BOTTOMS("Bottoms"),
;
private String realName;