feat: 新增验证码和代码优化重构

This commit is contained in:
haoxr
2023-03-24 22:41:59 +08:00
parent 3aea7729af
commit 20dec09bf5
19 changed files with 403 additions and 22 deletions

View File

@@ -0,0 +1,16 @@
package com.youlai.system.common.constant;
/**
* Redis 缓存常量
*
* @author: haoxr
* @date: 2023/03/24
*/
public interface CacheConstants {
/**
* 验证码缓存前缀
*/
String VERIFY_CODE_CACHE_PREFIX = "AUTH:VERIFY_CODE:";
}

View File

@@ -0,0 +1,16 @@
package com.youlai.system.common.constant;
/**
* Excel 常量
*
* @author: haoxr
* @date: 2023/03/24
*/
public interface ExcelConstants {
/**
* Excel 模板目录
*/
String EXCEL_TEMPLATE_DIR="excel-templates";
}

View File

@@ -23,4 +23,6 @@ public interface SystemConstants {
* 超级管理员角色编码
*/
String ROOT_ROLE_CODE = "ROOT";
}

View File

@@ -6,6 +6,8 @@ import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* 响应码枚举
*
* @author haoxr
* @date 2020-06-23
**/
@@ -25,6 +27,10 @@ public enum ResultCode implements IResultCode, Serializable {
USERNAME_OR_PASSWORD_ERROR("A0210", "用户名或密码错误"),
PASSWORD_ENTER_EXCEED_LIMIT("A0211", "用户输入密码次数超限"),
CLIENT_AUTHENTICATION_FAILED("A0212", "客户端认证失败"),
VERIFY_CODE_TIMEOUT("A0213", "验证码已过期"),
VERIFY_CODE_ERROR("A0214", "验证码错误"),
TOKEN_INVALID("A0230", "token无效或已过期"),
TOKEN_ACCESS_FORBIDDEN("A0231", "token已被禁止访问"),