mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-10-27 18:57:14 +08:00
refactor: 优化部分代码
修复 Sonar、Codacy 扫描问题
This commit is contained in:
@@ -26,9 +26,6 @@ import top.charles7c.continew.starter.core.constant.StringConstants;
|
||||
*/
|
||||
public class CacheConstants {
|
||||
|
||||
private CacheConstants() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 分隔符
|
||||
*/
|
||||
@@ -73,4 +70,7 @@ public class CacheConstants {
|
||||
* 仪表盘缓存键前缀
|
||||
*/
|
||||
public static final String DASHBOARD_KEY_PREFIX = "DASHBOARD" + DELIMITER;
|
||||
|
||||
private CacheConstants() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import top.charles7c.continew.starter.extension.crud.constant.ContainerPool;
|
||||
*/
|
||||
public class ContainerConstants extends ContainerPool {
|
||||
|
||||
private ContainerConstants() {
|
||||
}
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
public static final String USER_NICKNAME = ContainerPool.USER_NICKNAME;
|
||||
|
||||
/**
|
||||
* 用户角色 ID 列表
|
||||
@@ -38,4 +40,7 @@ public class ContainerConstants extends ContainerPool {
|
||||
* 角色部门列表
|
||||
*/
|
||||
public static final String ROLE_DEPT_ID_LIST = "RoleDeptIdList";
|
||||
|
||||
private ContainerConstants() {
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.constant;
|
||||
|
||||
/**
|
||||
* 文件相关常量
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 2023/1/2 21:19
|
||||
*/
|
||||
public class FileConstants {
|
||||
|
||||
private FileConstants() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 头像支持的图片类型
|
||||
*/
|
||||
public static final String[] AVATAR_SUPPORTED_IMG_TYPES = {"jpg", "png", "gif", "jpeg"};
|
||||
}
|
||||
@@ -16,18 +16,13 @@
|
||||
|
||||
package top.charles7c.continew.admin.common.constant;
|
||||
|
||||
import cn.hutool.core.lang.RegexPool;
|
||||
|
||||
/**
|
||||
* 正则相关常量
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 2023/1/10 20:06
|
||||
*/
|
||||
public class RegexConstants implements RegexPool {
|
||||
|
||||
private RegexConstants() {
|
||||
}
|
||||
public class RegexConstants {
|
||||
|
||||
/**
|
||||
* 用户名正则(长度为 4 到 64 位,可以包含字母、数字,下划线,以字母开头)
|
||||
@@ -53,4 +48,7 @@ public class RegexConstants implements RegexPool {
|
||||
* 包名正则(可以包含大小写字母、数字、下划线,每一级包名不能以数字开头)
|
||||
*/
|
||||
public static final String PACKAGE_NAME = "^(?:[a-zA-Z_][a-zA-Z0-9_]*\\.)*[a-zA-Z_][a-zA-Z0-9_]*$";
|
||||
|
||||
private RegexConstants() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,9 +26,6 @@ import top.charles7c.continew.starter.core.constant.StringConstants;
|
||||
*/
|
||||
public class SysConstants {
|
||||
|
||||
private SysConstants() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 管理员角色编码
|
||||
*/
|
||||
@@ -68,4 +65,7 @@ public class SysConstants {
|
||||
* 描述类字段后缀
|
||||
*/
|
||||
public static final String DESCRIPTION_FIELD_SUFFIX = "String";
|
||||
|
||||
private SysConstants() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,9 +24,6 @@ package top.charles7c.continew.admin.common.constant;
|
||||
*/
|
||||
public class UiConstants {
|
||||
|
||||
private UiConstants() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 主色(极致蓝)
|
||||
*/
|
||||
@@ -51,4 +48,7 @@ public class UiConstants {
|
||||
* 默认色(中性灰)
|
||||
*/
|
||||
public static final String COLOR_DEFAULT = "gray";
|
||||
|
||||
private UiConstants() {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user