first commit

This commit is contained in:
2023-06-12 22:49:55 +08:00
parent c931657a8a
commit 95bae3f9b3
11 changed files with 172 additions and 58 deletions

View File

@ -39,6 +39,16 @@ public class ConfigConstant {
*/
public static final String BLACKLIST_ON_OFF_KEY = SYS_CONFIG_KEY_PREFIX + "sys.account.blacklistOnOff";
/**
* 参数配置-黑名单过期时间(拉黑时间), 单位:分钟
*/
public static final String BLACKLIST_EXPIRE_TIME_KEY = SYS_CONFIG_KEY_PREFIX + "sys.account.blacklistExpireTime";
/**
* 参数配置-登陆最大错误次数
*/
public static final String LOGIN_ERROR_MAX_COUNT_KEY = SYS_CONFIG_KEY_PREFIX + "sys.account.loginErrorMaxCount";
/**
* 开
*/
@ -48,4 +58,9 @@ public class ConfigConstant {
* 关
*/
public static final String COMMON_OFF_VALUE = "false";
/**
* 默认最大允许错误次数
*/
public static final Integer DEFAULT_LOGIN_ERROR_MAX_COUNT = 5;
}

View File

@ -14,6 +14,11 @@ public class TenantConstant {
*/
public static final String TENANT_KEY_PREFIX = "tenant_";
/**
* 租户信息 Redis Key
*/
public static final String TENANT_INFO_KEY_PREFIX = "tenant_info:";
/**
* header 租户 key
*/
@ -23,4 +28,9 @@ public class TenantConstant {
* 系统默认租户ID
*/
public static final String DEFAULT_TENANT_ID = "1";
/**
* 登陆入口-获取正常的租户-Uri
*/
public static final String LOGIN_TENANT_LIST_URI = "/tenant/normal-list";
}

View File

@ -57,6 +57,13 @@ public class BaseContext {
TENANT_ID_HOLDER.set(tenantId);
}
/**
* 清除上下文中租户ID
*/
public static void clearTenantId() {
TENANT_ID_HOLDER.remove();
}
/**
* 获取上下文中的数据源
*/