save code

This commit is contained in:
xsl
2025-12-25 09:57:56 +08:00
commit b86860da8d
549 changed files with 52970 additions and 0 deletions
+63
View File
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>digital-common</artifactId>
<groupId>org.jeecgframework.boot</groupId>
<version>3.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>digital-base</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<!--集成springmvc框架 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<optional>true</optional>
</dependency>
<!-- Redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
</dependency>
<!--加载hutool-->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-core</artifactId>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-crypto</artifactId>
</dependency>
<!--加载beanutils-->
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
<version>1.9.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.22</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,24 @@
package digital.base.annotation;
import java.lang.annotation.*;
/**
* 通过此注解声明的接口,自动实现字典翻译
*
* @Author scott
* @email jeecgos@163.com
* @Date 2022年01月05日
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface AutoDict {
/**
* 暂时无用
*
* @return
*/
String value() default "";
}
@@ -0,0 +1,47 @@
package digital.base.annotation;
import digital.base.constant.CommonConstant;
import digital.base.enums.ModuleType;
import java.lang.annotation.*;
/**
* 系统日志注解
*
* @Author scott
* @email jeecgos@163.com
* @Date 2019年1月14日
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface AutoLog {
/**
* 日志内容
*
* @return
*/
String value() default "";
/**
* 日志类型
*
* @return 0:操作日志;1:登录日志;2:定时任务;
*/
int logType() default CommonConstant.LOG_TYPE_2;
/**
* 操作日志类型
*
* @return 1查询,2添加,3修改,4删除)
*/
int operateType() default 0;
/**
* 模块类型 默认为common
*
* @return
*/
ModuleType module() default ModuleType.COMMON;
}
@@ -0,0 +1,34 @@
package digital.base.annotation;
import digital.base.enums.LowAppAopEnum;
import java.lang.annotation.*;
/**
* 自动注入low_app_id
*
* @Author scott
* @email jeecgos@163.com
* @Date 2022年01月05日
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface AutoLowApp {
/**
* 切面类型(add、delete、db_import等其他操作)
*
* @return
*/
LowAppAopEnum action();
/**
* 业务类型(cgform等)
*
* @return
*/
String bizType();
}
@@ -0,0 +1,43 @@
package digital.base.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 字典注解
*
* @author: dangzhenghui
* @date: 2019年03月17日-下午9:37:16
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Dict {
/**
* 方法描述: 数据code
* 作 者: dangzhenghui
* 日 期: 2019年03月17日-下午9:37:16
*
* @return 返回类型: String
*/
String dicCode();
/**
* 方法描述: 数据Text
* 作 者: dangzhenghui
* 日 期: 2019年03月17日-下午9:37:16
*
* @return 返回类型: String
*/
String dicText() default "";
/**
* 方法描述: 数据字典表
* 作 者: dangzhenghui
* 日 期: 2019年03月17日-下午9:37:16
*
* @return 返回类型: String
*/
String dictTable() default "";
}
@@ -0,0 +1,21 @@
package digital.base.annotation;
import java.lang.annotation.*;
/**
* online请求拦截专用注解
*
* @author: smcp
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
@Documented
public @interface OnlineAuth {
/**
* 请求关键字,在xxx/code之前的字符串
*
* @return
*/
String value();
}
@@ -0,0 +1,27 @@
package digital.base.annotation;
import java.lang.annotation.*;
/**
* 数据权限注解
*
* @Author taoyan
* @Date 2019年4月11日
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
@Documented
public @interface PermissionData {
/**
* 暂时没用
*
* @return
*/
String value() default "";
/**
* 配置菜单的组件路径,用于数据权限
*/
String pageComponent() default "";
}
@@ -0,0 +1,24 @@
package digital.base.annotation;
import org.springframework.core.annotation.AliasFor;
import org.springframework.stereotype.Component;
import java.lang.annotation.*;
/**
* @Author:zyf
* @Date:2019-07-31 10:43
* @Description: 消息队列初始化注解
**/
@Documented
@Inherited
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Component
public @interface RabbitComponent {
@AliasFor(
annotation = Component.class
)
String value();
}
@@ -0,0 +1,103 @@
package digital.base.constant;
/**
* @author: huangxutao
* @date: 2019-06-14
* @description: 缓存常量
*/
public interface CacheConstant {
/**
* 字典信息缓存(含禁用的字典项)
*/
public static final String SYS_DICT_CACHE = "sys:cache:dict";
/**
* 字典信息缓存 status为有效的
*/
public static final String SYS_ENABLE_DICT_CACHE = "sys:cache:dictEnable";
/**
* 表字典信息缓存
*/
public static final String SYS_DICT_TABLE_CACHE = "sys:cache:dictTable";
public static final String SYS_DICT_TABLE_BY_KEYS_CACHE = SYS_DICT_TABLE_CACHE + "ByKeys";
/**
* 数据权限配置缓存
*/
public static final String SYS_DATA_PERMISSIONS_CACHE = "sys:cache:permission:datarules";
/**
* 缓存用户信息
*/
public static final String SYS_USERS_CACHE = "sys:cache:user";
/**
* 全部部门信息缓存
*/
public static final String SYS_DEPARTS_CACHE = "sys:cache:depart:alldata";
/**
* 全部部门ids缓存
*/
public static final String SYS_DEPART_IDS_CACHE = "sys:cache:depart:allids";
/**
* 测试缓存key
*/
public static final String TEST_DEMO_CACHE = "test:demo";
/**
* 字典信息缓存
*/
public static final String SYS_DYNAMICDB_CACHE = "sys:cache:dbconnect:dynamic:";
/**
* gateway路由缓存
*/
public static final String GATEWAY_ROUTES = "sys:cache:cloud:gateway_routes";
/**
* gateway路由 reload key
*/
public static final String ROUTE_JVM_RELOAD_TOPIC = "gateway_jvm_route_reload_topic";
/**
* TODO 冗余代码 待删除
*插件商城排行榜
*/
public static final String PLUGIN_MALL_RANKING = "pluginMall::rankingList";
/**
* TODO 冗余代码 待删除
*插件商城排行榜
*/
public static final String PLUGIN_MALL_PAGE_LIST = "pluginMall::queryPageList";
/**
* online列表页配置信息缓存key
*/
public static final String ONLINE_LIST = "sys:cache:online:list";
/**
* online表单页配置信息缓存key
*/
public static final String ONLINE_FORM = "sys:cache:online:form";
/**
* online报表
*/
public static final String ONLINE_RP = "sys:cache:online:rp";
/**
* online图表
*/
public static final String ONLINE_GRAPH = "sys:cache:online:graph";
/**
* 拖拽页面信息缓存
*/
public static final String DRAG_PAGE_CACHE = "drag:cache:page";
}
@@ -0,0 +1,391 @@
package digital.base.constant;
/**
* @Description: 通用常量
* @author: smcp
*/
public interface CommonConstant {
public static final Integer CALLBACK_SUCCESS = 0;
public static final Integer CALLBACK_FAIL = -1;
public static final String TRY_ON_TYPE_ALGO_CLOTH = "cloth";
public static final String TRY_ON_TYPE_ALGO_HAIR = "hair";
public static final String TRY_ON_TYPE_SINGLE = "single";
public static final String TRY_ON_TYPE_BATCH = "batch";
public static final String ROLE_TYPE_SUPER_ADMIN = "admin";
public static final String COMMON_YES = "yes";
public static final String COMMON_NO = "no";
public static final String EXCLUDE_SUIT = "excludeSuit";
public static final String TYPE_TOP_CLOTH = "topCloth";
public static final String TYPE_BOTTOM_CLOTH = "bottomCloth";
public static final String TYPE_DRESS = "dress";
//发型
public static final String TYPE_HAIR = "hair";
//身材
public static final String TYPE_FIGURE = "figure";
//内衣
public static final String TYPE_UNDERWEAR = "underwear";
//试穿 生成中图片链接
public static final String TRY_ON_IN_PROCESS = "https://digit-person.oss-cn-beijing.aliyuncs.com/digital_cloth/1720084773937.png";
//试穿 生成失败图片链接
public static final String TRY_ON_FAIL = "https://digit-person.oss-cn-beijing.aliyuncs.com/digital_cloth/1720084729963.png";
/**
* 短信验证码redis-key的前缀
*/
String PHONE_REDIS_KEY_PRE = "phone_msg";
/**
* 衣服
*/
public static final String CLOTH_FILE_TYPE = "clothType";
/**
* 模特
*/
public static final String MODEL_FILE_TYPE = "modelType";
/**
* 发型
*/
public static final String HAIR_FILE_TYPE = "hairType";
/**
* 超级管理员 tenantId 值
*/
String ADMIN_TENANT_ID = "0";
/**
* 数字人审核 成功! 1 合格 0不 合格
*/
public static final Integer CUSTOM_CHECK_SUCCESS = 1;
/**
* 视频是否合格 1 合格 0不 合格
*/
public static final Integer VIDEO_CHECK_FAIL = 0;
/**
* 竖版
*/
public static final String picture_align_type_VERTICAL = "VERTICAL";
/**
* :横版
*/
public static final String picture_align_type_HORIZONTAL = "HORIZONTAL";
/**
* 上传视频管理 前缀
*/
public static final String FILE_VIRTUAL_HUMAN = "virtual_human";
public static final String DIGITAL_CLOTH = "digital_cloth";
/**
* 文件状态 禁用
*/
public static final String FILE_STATUS_DISABLE = "disable";
/**
* 文件状态 失败
*/
public static final String FILE_STATUS_FAIL = "fail";
/**
* 文件状态可用
*/
public static final String FILE_STATUS_ENABLE = "enable";
/**
* 来源 第三方
*/
public static final String FILE_TYPE_VIDEO = "video";
public static final String PUTON_SWAP = "cloth_swap";
public static final String HAIR_SWAP = "hair";
public static final String FILE_TYPE_AUDIO = "audio";
public static final String FILE_TYPE_PICTURE = "picture";
/**
* 来源 自研
*/
public static final String SOURCE_TYPE_SELF_DEVELOP = "0";
/**
* 来源 第三方
*/
public static final String SOURCE_TYPE_THIRD = "1";
public static final String CUSTOMIZED_TYPE = "CUSTOMIZED";
public static final String FREE_TYPE = "FREE";
public static final Integer CUSTOMIZED_TYPE_VALUE = 1;
public static final Integer FREE_TYPE_VALUE = 2;
/**
* 删除标志
*/
public static final Integer DEL_FLAG_1 = 1;
/**
* 未删除
*/
public static final Integer DEL_FLAG_0 = 0;
/**
* 系统日志类型: 登录
*/
public static final int LOG_TYPE_1 = 1;
/**
* 系统日志类型: 操作
*/
public static final int LOG_TYPE_2 = 2;
/**
* 操作日志类型: 查询
*/
public static final int OPERATE_TYPE_1 = 1;
/**
* 操作日志类型: 添加
*/
public static final int OPERATE_TYPE_2 = 2;
/**
* 操作日志类型: 更新
*/
public static final int OPERATE_TYPE_3 = 3;
/**
* 操作日志类型: 删除
*/
public static final int OPERATE_TYPE_4 = 4;
/**
* 操作日志类型: 倒入
*/
public static final int OPERATE_TYPE_5 = 5;
/**
* 操作日志类型: 导出
*/
public static final int OPERATE_TYPE_6 = 6;
/**
* {@code 500 Server Error} (HTTP/1.0 - RFC 1945)
*/
public static final Integer SC_INTERNAL_SERVER_ERROR_500 = 500;
/**
* {@code 200 OK} (HTTP/1.0 - RFC 1945)
*/
public static final Integer SC_OK_200 = 200;
/**
* 访问权限认证未通过 510
*/
public static final Integer SC_JEECG_NO_AUTHZ = 510;
/**
* 登录用户Shiro权限缓存KEY前缀
*/
public static String PREFIX_USER_SHIRO_CACHE = "shiro:cache:org.jeecg.config.shiro.ShiroRealm.authorizationCache:";
/**
* 登录用户Token令牌缓存KEY前缀
*/
public static final String PREFIX_USER_TOKEN = "prefix_user_token_";
// /** Token缓存时间:3600秒即一小时 */
// public static final int TOKEN_EXPIRE_TIME = 3600;
/**
* 0:一级菜单
*/
public static final Integer MENU_TYPE_0 = 0;
/**
* 1:子菜单
*/
public static final Integer MENU_TYPE_1 = 1;
/**
* 2:按钮权限
*/
public static final Integer MENU_TYPE_2 = 2;
/**
* 通告对象类型(USER:指定用户,ALL:全体用户)
*/
public static final String MSG_TYPE_UESR = "USER";
public static final String MSG_TYPE_ALL = "ALL";
/**
* 发布状态(0未发布,1已发布,2已撤销)
*/
public static final String NO_SEND = "0";
public static final String HAS_SEND = "1";
public static final String HAS_CANCLE = "2";
/**
* 阅读状态(0未读,1已读)
*/
public static final String HAS_READ_FLAG = "1";
public static final String NO_READ_FLAG = "0";
/**
* 优先级(L低,M中,H高)
*/
public static final String PRIORITY_L = "L";
public static final String PRIORITY_M = "M";
public static final String PRIORITY_H = "H";
/**
* 短信模板方式 0 .登录模板、1.注册模板、2.忘记密码模板
*/
public static final String SMS_TPL_TYPE_0 = "0";
public static final String SMS_TPL_TYPE_1 = "1";
public static final String SMS_TPL_TYPE_2 = "2";
/**
* 状态(0无效1有效)
*/
public static final String STATUS_0 = "0";
public static final String STATUS_1 = "1";
/**
* 同步工作流引擎1同步0不同步
*/
public static final Integer ACT_SYNC_1 = 1;
public static final Integer ACT_SYNC_0 = 0;
/**
* 消息类型1:通知公告2:系统消息
*/
public static final String MSG_CATEGORY_1 = "1";
public static final String MSG_CATEGORY_2 = "2";
/**
* 是否配置菜单的数据权限 1是0否
*/
public static final Integer RULE_FLAG_0 = 0;
public static final Integer RULE_FLAG_1 = 1;
/**
* 是否用户已被冻结 1正常(解冻) 2冻结
*/
public static final Integer USER_UNFREEZE = 1;
public static final Integer USER_FREEZE = 2;
/**
* 字典翻译文本后缀
*/
public static final String DICT_TEXT_SUFFIX = "_dictText";
/**
* 文件上传类型(本地:localMiniominio,阿里云:alioss
*/
public static final String UPLOAD_TYPE_LOCAL = "local";
public static final String UPLOAD_TYPE_MINIO = "minio";
public static final String UPLOAD_TYPE_OSS = "alioss";
/**
* sys_quartz_job 表 job_class_name 唯一键索引
*/
public static final String SQL_INDEX_UNIQ_JOB_CLASS_NAME = "uniq_job_class_name";
/**
* sys_position 表 code 唯一键索引
*/
public static final String SQL_INDEX_UNIQ_CODE = "uniq_code";
/**
* sys_role 表 code 唯一键索引
*/
public static final String SQL_INDEX_UNIQ_SYS_ROLE_CODE = "uniq_sys_role_role_code";
/**
* sys_depart 表 code 唯一键索引
*/
public static final String SQL_INDEX_UNIQ_DEPART_ORG_CODE = "uniq_depart_org_code";
/**
* sys_category 表 code 唯一键索引
*/
public static final String SQL_INDEX_UNIQ_CATEGORY_CODE = "idx_sc_code";
public final static String X_ACCESS_TOKEN = "X-Access-Token";
public final static String X_SIGN = "X-Sign";
public final static String X_TIMESTAMP = "X-TIMESTAMP";
public final static String TOKEN_IS_INVALID_MSG = "Token失效,请重新登录!";
/**
* 多租户 请求头
*/
public final static String TENANT_ID = "tenant-id";
/**
* 微服务读取配置文件属性 服务地址
*/
public final static String CLOUD_SERVER_KEY = "spring.cloud.nacos.discovery.server-addr";
/**
* 第三方登录 验证密码/创建用户 都需要设置一个操作码 防止被恶意调用
*/
public final static String THIRD_LOGIN_CODE = "third_login_code";
/**
* ONLINE 报表权限用 从request中获取地址栏后的参数
*/
String ONL_REP_URL_PARAM_STR = "onlRepUrlParamStr";
/**
* POST请求
*/
String HTTP_POST = "POST";
/**
* PUT请求
*/
String HTTP_PUT = "PUT";
/**
* PATCH请求
*/
String HTTP_PATCH = "PATCH";
/**
* 未知的
*/
String UNKNOWN = "unknown";
/**
* 字符串http
*/
String STR_HTTP = "http";
/**
* String 类型的空值
*/
String STRING_NULL = "null";
/**
* .do
*/
String SPOT_DO = ".do";
}
@@ -0,0 +1,37 @@
package digital.base.constant;
/**
* 系统通告 - 发布状态
* @Author LeeShaoQing
*
*/
public interface CommonSendStatus {
/**
* 未发布
*/
public static final String UNPUBLISHED_STATUS_0 = "0";
/**
* 已发布
*/
public static final String PUBLISHED_STATUS_1 = "1";
/**
* 撤销
*/
public static final String REVOKE_STATUS_2 = "2";
/**
* app端推送会话标识后缀
*/
public static final String APP_SESSION_SUFFIX = "_app";
/**流程催办——系统通知消息模板*/
public static final String TZMB_BPM_CUIBAN = "bpm_cuiban";
/**标准模板—系统消息通知*/
public static final String TZMB_SYS_TS_NOTE = "sys_ts_note";
/**流程超时提醒——系统通知消息模板*/
public static final String TZMB_BPM_CHAOSHI_TIP = "bpm_chaoshi_tip";
}
@@ -0,0 +1,156 @@
package digital.base.constant;
/**
* 数据库上下文常量
* @author: smcp
*/
public interface DataBaseConstant {
//*********数据库类型****************************************
/**MYSQL数据库*/
public static final String DB_TYPE_MYSQL = "MYSQL";
/** ORACLE*/
public static final String DB_TYPE_ORACLE = "ORACLE";
/**达梦数据库*/
public static final String DB_TYPE_DM = "DM";
/**postgreSQL达梦数据库*/
public static final String DB_TYPE_POSTGRESQL = "POSTGRESQL";
/**sqlserver数据库*/
public static final String DB_TYPE_SQLSERVER = "SQLSERVER";
/**mariadb 数据库*/
public static final String DB_TYPE_MARIADB = "MARIADB";
/**DB2 数据库*/
public static final String DB_TYPE_DB2 = "DB2";
/**HSQL 数据库*/
public static final String DB_TYPE_HSQL = "HSQL";
// // 数据库类型,对应 database_type 字典
// public static final String DB_TYPE_MYSQL_NUM = "1";
// public static final String DB_TYPE_MYSQL7_NUM = "6";
// public static final String DB_TYPE_ORACLE_NUM = "2";
// public static final String DB_TYPE_SQLSERVER_NUM = "3";
// public static final String DB_TYPE_POSTGRESQL_NUM = "4";
// public static final String DB_TYPE_MARIADB_NUM = "5";
//*********系统上下文变量****************************************
/**
* 数据-所属机构编码
*/
public static final String SYS_ORG_CODE = "sysOrgCode";
/**
* 数据-所属机构编码
*/
public static final String SYS_ORG_CODE_TABLE = "sys_org_code";
/**
* 数据-所属机构编码
*/
public static final String SYS_MULTI_ORG_CODE = "sysMultiOrgCode";
/**
* 数据-所属机构编码
*/
public static final String SYS_MULTI_ORG_CODE_TABLE = "sys_multi_org_code";
/**
* 数据-系统用户编码(对应登录用户账号)
*/
public static final String SYS_USER_CODE = "sysUserCode";
/**
* 数据-系统用户编码(对应登录用户账号)
*/
public static final String SYS_USER_CODE_TABLE = "sys_user_code";
/**
* 登录用户真实姓名
*/
public static final String SYS_USER_NAME = "sysUserName";
/**
* 登录用户真实姓名
*/
public static final String SYS_USER_NAME_TABLE = "sys_user_name";
/**
* 系统日期"yyyy-MM-dd"
*/
public static final String SYS_DATE = "sysDate";
/**
* 系统日期"yyyy-MM-dd"
*/
public static final String SYS_DATE_TABLE = "sys_date";
/**
* 系统时间"yyyy-MM-dd HH:mm"
*/
public static final String SYS_TIME = "sysTime";
/**
* 系统时间"yyyy-MM-dd HH:mm"
*/
public static final String SYS_TIME_TABLE = "sys_time";
/**
* 数据-所属机构编码
*/
public static final String SYS_BASE_PATH = "sys_base_path";
//*********系统上下文变量****************************************
//*********系统建表标准字段****************************************
/**
* 创建者登录名称
*/
public static final String CREATE_BY_TABLE = "create_by";
/**
* 创建者登录名称
*/
public static final String CREATE_BY = "createBy";
/**
* 创建日期时间
*/
public static final String CREATE_TIME_TABLE = "create_time";
/**
* 创建日期时间
*/
public static final String CREATE_TIME = "createTime";
/**
* 更新用户登录名称
*/
public static final String UPDATE_BY_TABLE = "update_by";
/**
* 更新用户登录名称
*/
public static final String UPDATE_BY = "updateBy";
/**
* 更新日期时间
*/
public static final String UPDATE_TIME = "updateTime";
/**
* 更新日期时间
*/
public static final String UPDATE_TIME_TABLE = "update_time";
/**
* 业务流程状态
*/
public static final String BPM_STATUS = "bpmStatus";
/**
* 业务流程状态
*/
public static final String BPM_STATUS_TABLE = "bpm_status";
//*********系统建表标准字段****************************************
/**
* 租户ID 实体字段名
*/
String TENANT_ID = "tenantId";
/**
* 租户ID 数据库字段名
*/
String TENANT_ID_TABLE = "tenant_id";
/**
* sql语句 where
*/
String SQL_WHERE = "where";
}
@@ -0,0 +1,82 @@
package digital.base.constant;
/**
* author: smcp
* date:2022-08-10 15:02
* description
**/
public interface DictConstants {
/**
* 前端区域表信息查询
*/
public static final String FRONT_DICT_SMCP_AREA = "smcp_area";
/**
* 客户端系统设置 系统语言 中文
*/
public static final String CLIENT_SYSTEM_LANGUAGE_CHINESE = "1";
/**
* 客户端系统设置 系统语言 繁体
*/
public static final String CLIENT_SYSTEM_LANGUAGE_TRADITIONAL = "2";
/**
* 客户端系统设置 系统语言 英文
*/
public static final String CLIENT_SYSTEM_LANGUAGE_ENGLISH = "3";
/**
* 客户端系统设置 系统语言 key
*/
public static final String CLIENT_SYSTEM_LANGUAGE_KEY = "system-language";
/**
* 字典 系统语言 dict_code
*/
public static final String DCIT_SYSTEM_LANGUAGE_KEY = "sys_language";
/**
* 客户端系统设置 自动下载 key
*/
public static final String CLIENT_AUTOMATIC_DOWNLOAD_KEY = "auto-download";
/**
* 客户端系统设置 播放速度 key
*/
public static final String CLIENT_SWITCH_SPEED_KEY = "switch-speed";
/**
* 客户端系统设置 清理缓冲 key
*/
public static final String CLIENT_CLEAR_CACHE = "clear-cache";
/**
* 客户端系统设置 隐私条款 key
*/
public static final String CLIENT_PRIVACY_POLICY = "privacy-policy";
/**
* 客户端系统设置 软件版本 key
*/
public static final String CLIENT_SOFTWARE_VERSION = "software-version";
/**
* 播放速度 编号
*/
public static final String SWITCH_SPEED = "switch_speed";
/**
* 自动下载 编号
*/
public static final String AUTOMATIC_DOWNLOAD = "auto-download";
/**
* 系统语言 编号
*/
public static final String SYS_LANGUAGE = "sys_language";
}
@@ -0,0 +1,63 @@
package digital.base.constant;
public interface Face3dSeverHTTPConstant {
public static final String SWAP_UNDERWEAR = "http://192.168.11.219:8009/cloth/swapInner";
public static final String FIGURE_UPLOAD = "http://service.aicloud.fit:6068/bodyManager";
public static final String HAIR_UPLOAD = "http://service.aicloud.fit:7393/api/uploadHair/v1";
public static final String SWAP_HAIR_v1 = "http://service.aicloud.fit:7393/api/swapHair/v1";
public static final String SWAP_HAIR_v2 = "http://service.aicloud.fit:7393/api/swapHair/v2";
public static final String CLOTH_UPLOAD = "http://192.168.11.219:8009/cloth/upload";
public static final String SWAP_CLOTH = "http://192.168.11.219:8009/cloth/swap";
public static final String SWAP_CLOTH_MALE = "http://192.168.11.219:8009/cloth/swapMan";
public static final String CRAWLER_VIP = "http://192.168.11.138:9100/api/crawler_vip/v1";
/**
* DRAFT:草稿 IN_PROGRESS:制作中 IN_PROGRESS_FAIL:制作中 SUCCESS:制作成功 FAIL:制作失败
*/
public static final String CREATE_STATUS_CANCEL = "CANCEL";
public static final String CREATE_STATUS_DRAFT = "DRAFT";
public static final String CREATE_STATUS_IN_PROGRESS = "IN_PROGRESS";
/**
* DRAFT:草稿 IN_PROGRESS:制作中 IN_PROGRESS_FAIL:制作中 SUCCESS:制作成功 FAIL:制作失败
*/
public static final String CREATE_STATUS_SUCCESS = "SUCCESS";
/**
* DRAFT:草稿 IN_PROGRESS:制作中 IN_PROGRESS_FAIL:制作中 SUCCESS:制作成功 FAIL:制作失败
*/
public static final String CREATE_STATUS_FAIL = "FAIL";
public static final String result_success = "success";
public static final String result_fail = "FAIL";
/**
* 共享盘 存 衣服
*/
public static final String UPLOADED_FOLDER_CLOTH = "/cloth/";
/**
* 共享盘 存 模特
*/
public static final String UPLOADED_FOLDER_MODEL = "/model/";
/**
* 共享盘 存 平铺图
*/
public static final String UPLOADED_FOLDER_TILE = "/tile/";
}
@@ -0,0 +1,25 @@
package digital.base.constant;
/**
* 规则值生成 编码常量类
* @author: taoyan
* @date: 2020年04月02日
*/
public class FillRuleConstant {
/**
* 公文发文编码
*/
public static final String DOC_SEND = "doc_send_code";
/**
* 部门编码
*/
public static final String DEPART = "org_num_role";
/**
* 分类字典编码
*/
public static final String CATEGORY = "category_code_rule";
}
@@ -0,0 +1,23 @@
package digital.base.constant;
/**
* @Description: GlobalConstants
* @author: scott
* @date: 2020/01/01 16:01
*/
public class GlobalConstants {
/**
* 业务处理器beanName传递参数
*/
public static final String HANDLER_NAME = "handlerName";
/**
* 路由刷新触发器
*/
public static final String LODER_ROUDER_HANDLER = "loderRouderHandler";
/**
* redis消息通道名称
*/
public static final String REDIS_TOPIC_NAME="jeecg_redis_topic";
}
@@ -0,0 +1,55 @@
package digital.base.constant;
/**
* author: damao
* date:2022-08-30 22:20
* description
**/
public interface LanguageTypeConstants {
/**
* 该值不可用,系统中已存在
*/
public static final String LANGUAGE_TYPE_DUPLICATE_CHECK = "该值不可用,系统中已存在!";
/**
* 添加成功
*/
public static final String LANGUAGE_TYPE_ADD_SUCCESS = "添加成功!";
/**
* 操作失败
*/
public static final String LANGUAGE_TYPE_OPERATE_FAIL = "操作失败!";
/**
* 操作成功
*/
public static final String LANGUAGE_TYPE_OPERATE_SUCCESS = "操作成功!";
/**
* 编辑成功
*/
public static final String LANGUAGE_TYPE_EDIT_SUCCESS = "编辑成功!";
/**
* 删除成功
*/
public static final String LANGUAGE_TYPE_DELETE_SUCCESS = "删除成功!";
/**
* 批量删除成功
*/
public static final String LANGUAGE_TYPE_BATCH_DELETE_SUCCESS = "批量删除成功!";
/**
* 未找到对应数据
*/
public static final String LANGUAGE_TYPE_NO_DATA = "未找到对应数据!";
/**
* 登录成功
*/
public static final String LANGUAGE_TYPE_LOGIN_SUCCESS = "登录成功!";
/**
* 退出登录成功
*/
public static final String LANGUAGE_TYPE_LOG_OUT_SUCCESSFULLY = "退出登录成功!";
}
@@ -0,0 +1,24 @@
package digital.base.constant;
/**
* author: damao
* date:2022-08-27 17:12
* description
**/
public interface RoleConstant {
/**
* 角色id 超级管理员
*/
public static final String SUPER_ADMIN_ROLE_ID = "1562999412925894658";
/**
* 角色id 系统管理员
*/
public static final String SYS_ADMIN_ROLE_ID = "f6817f48af4fb3af11b9e8bf182f618b";
/**
* 角色id 区域管理员
*/
public static final String AREA_ADMIN_ROLE_ID = "1559512408061796353";
}
@@ -0,0 +1,42 @@
/*
*
* * Copyright (c) 2019-2020, 冷冷 (wangiegie@gmail.com).
* * <p>
* * Licensed under the GNU Lesser General Public License 3.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
* * <p>
* * https://www.gnu.org/licenses/lgpl.html
* * <p>
* * 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 digital.base.constant;
/**
* @author scott
* @date 2019年05月18日
* 服务名称
*/
public interface ServiceNameConstants {
/**
* 微服务名:系统管理模块
*/
String SERVICE_SYSTEM = "jeecg-system";
/**
* 微服务名:Demo模块
*/
String SERVICE_DEMO = "jeecg-demo";
/**
* gateway通过header传递根路径 basePath
*/
String X_GATEWAY_BASE_PATH = "X_GATEWAY_BASE_PATH";
}
@@ -0,0 +1,74 @@
package digital.base.constant;
public interface ShortVideoOfflineComConstant {
public static final String result_success = "success";
public static final String result_fail = "FAIL";
/**
* 正常状态
*/
public static final String STATUS_NORMAL = "200";
// 数字人模型 1.1.1 数字人定制
public static final String CREATE_DIGITAL_PERSON_HTTP = "https://meta.yiwise.com/openApiDigitalPerson/customer/customizeLiveModel";
// 数字人模型 1.1.2 音色定制
public static final String CUSTOM_AUDIO_ASSET_HTTP = "https://meta.yiwise.com/openApiDigitalPerson/customer/audioCustomize";
// 数字人模型 1.1.3 数字人名称更新
public static final String RENAME_PERSON_ASSET_HTTP = "https://meta.yiwise.com/openApiDigitalPerson/customer/updatePersonAssetName";
// 数字人模型 1.1.4 音色名称更新
public static final String RENAME_AUDIO_ASSET_HTTP = "https://meta.yiwise.com/openApiDigitalPerson/customer/updateAudioAssetName";
// 数字人模型 1.1.5 删除定制模特
public static final String DEL_PERSON_ASSET_HTTP = "https://meta.yiwise.com/openApiDigitalPerson/customer/deleteDigitalPersonAsset";
// 数字人模型 1.1.6 删除定制音色
public static final String DEL_AUDIO_ASSET_HTTP = "https://meta.yiwise.com/openApiDigitalPerson/customer/deleteAudioAsset";
// 数字人模型 1.1.7 定制音色查询
public static final String GET_AUDIO_ASSET_HTTP = "https://meta.yiwise.com/openApiDigitalPerson/customer/getAudioAssetsById";
// 数字人模型 1.1.8 定制音色列表查询
public static final String GET_AUDIO_LIST_HTTP = "https://meta.yiwise.com/openApiDigitalPerson/customer/audioAssetsList";
// 数字人模型 1.1.9 定制数字人列表查询
public static final String GET_CUSTOM_PERSON_LIST_HTTP = "https://meta.yiwise.com/openApiDigitalPerson/customer/customizeAssets";
// 数字人模型 1.1.10 免费数字人列表查询
public static final String GET_FREE_PERSON_LIST_HTTP = "https://meta.yiwise.com/openApiDigitalPerson/customer/freeAssets";
// 短视频作品 1.3.1 创建视频合成-利用音频文件
public static final String CREATE_WITH_AUDIO_HTTP = "https://meta.yiwise.com/openApiDigitalPerson/customer/composeWithAudio";
// 短视频作品 1.3.2 创建视频合成-利用tts
public static final String CREATE_WITH_TTS_HTTP = "https://meta.yiwise.com/openApiDigitalPerson/customer/composeWithTTS";
// 短视频作品 1.3.3 更新视频作品名称
public static final String RENAME_VIDEO_HTTP = "https://meta.yiwise.com/openApiDigitalPerson/customer/updateWorkName";
// 短视频作品 1.3.4 视频创建任务状态查询
public static final String GET_VIDEO_STATUS_HTTP = "https://meta.yiwise.com/openApiDigitalPerson/customer/detail ";
// 短视频作品 1.3.5 视频作品列表
public static final String GET_VIDEO_LIST_HTTP = "https://meta.yiwise.com/openApiDigitalPerson/customer/workList";
// 短视频作品 1.3.7 删除视频作品
public static final String DEL_VIDEO_HTTP = "https://meta.yiwise.com/openApiDigitalPerson/customer/deleteWork";
// 短视频作品 1.3.8 复制视频作品
public static final String COPY_VIDEO_HTTP = "https://meta.yiwise.com/openApiDigitalPerson/customer/copyWork";
// 短视频作品 1.3.9 视频作品统计
public static final String COUNT_VIDEO_HTTP = "https://meta.yiwise.com/openApiDigitalPerson/customer/videoStatistics";
//========================================================下面是本地算法==============================================================
// 创建数字人定制任务-请求算法(新增)
public static final String CUSTOM_CREATE_TASK_HTTP = "http://service.aicloud.fit:9008/train/v1";
}
@@ -0,0 +1,89 @@
package digital.base.constant;
/**
* @Description: 符号和特殊符号常用类
* @author: wangshuai
* @date: 2022年03月30日 17:44
*/
public class SymbolConstant {
/**
* 符号:点
*/
public static final String SPOT = ".";
/**
* 符号:双斜杠
*/
public static final String DOUBLE_BACKSLASH = "\\";
/**
* 符号:冒号
*/
public static final String COLON = ":";
/**
* 符号:逗号
*/
public static final String COMMA = ",";
/**
* 符号:左花括号 }
*/
public static final String LEFT_CURLY_BRACKET = "{";
/**
* 符号:右花括号 }
*/
public static final String RIGHT_CURLY_BRACKET = "}";
/**
* 符号:井号 #
*/
public static final String WELL_NUMBER = "#";
/**
* 符号:单斜杠
*/
public static final String SINGLE_SLASH = "/";
/**
* 符号:双斜杠
*/
public static final String DOUBLE_SLASH = "//";
/**
* 符号:感叹号
*/
public static final String EXCLAMATORY_MARK = "!";
/**
* 符号:下划线
*/
public static final String UNDERLINE = "_";
/**
* 符号:单引号
*/
public static final String SINGLE_QUOTATION_MARK = "'";
/**
* 符号:星号
*/
public static final String ASTERISK = "*";
/**
* 符号:百分号
*/
public static final String PERCENT_SIGN = "%";
/**
* 符号:美元 $
*/
public static final String DOLLAR = "$";
/**
* 符号:和 &
*/
public static final String AND = "&";
}
@@ -0,0 +1,62 @@
package digital.base.constant;
/**
* author: smcp
* date:2022-08-26 9:41
* description
**/
public interface UserFileConstant {
/**
* 是否是 临时文件 0 不是
*
*/
public static final String IS_TEMP_NO = "0";
/**
* 是否是 临时文件 1 是
*
*/
public static final String IS_TEMP_YES = "1";
/**
* 文件类型 1 图片
*
*/
public static final String FILE_TYPE_IMAGE = "1";
/**
* 文件类型 2 pdf
*
*/
public static final String FILE_TYPE_PDF = "2";
/**
* 是否是文件夹 0 不是
*
*/
public static final Integer IS_DIR_NO = 0;
/**
* 是否是文件夹 1 是文件夹
*
*/
public static final Integer IS_DIR_YES = 1;
/**
* 文件下载状态 1开始下载
*
*/
public static final String file_download_status_begin = "1";
/**
*
* 文件下载状态 2下载完成
*/
public static final String file_download_status_end = "2";
/**
*
* 文件下载状态 3下载失败
*/
public static final String file_download_status_error = "3";
}
@@ -0,0 +1,35 @@
package digital.base.constant;
public interface VideoConstant {
public static final String result_success = "success";
public static final String result_fail = "fail";
public static final Integer source_type_0 = 0;
/**
* 文本生成:1
* 音频生成:2
* 不同入参必传参数不一样
*/
public static final String video_Type_text = "1";
/**
* 文本生成:1
* 音频生成:2
* 不同入参必传参数不一样
*/
public static final String video_Type_audio = "2";
/**
* 正常状态
*/
public static final String STATUS_NORMAL = "200";
// 1.2.1 音色列表
public static final String GET_VOICE_LIST_HTTP = "https://meta.yiwise.com/openApiDigitalPerson/customer/audioAssetsList";
}
@@ -0,0 +1,33 @@
package digital.base.constant;
/**
* VXESocket 常量
*
* update: 【类名改了大小写】 date: 2022-04-18
* @author: smcp
*/
public class VxeSocketConst {
/**
* 消息类型
*/
public static final String TYPE = "type";
/**
* 消息数据
*/
public static final String DATA = "data";
/**
* 消息类型:心跳检测
*/
public static final String TYPE_HB = "heart_beat";
/**
* 消息类型:通用数据传递
*/
public static final String TYPE_CSD = "common_send_date";
/**
* 消息类型:更新vxe table数据
*/
public static final String TYPE_UVT = "update_vxe_table";
}
@@ -0,0 +1,61 @@
package digital.base.constant;
/**
* @Description: Websocket常量类
* @author: taoyan
* @date: 2020年03月23日
*/
public class WebsocketConst {
/**
* 消息json key:cmd
*/
public static final String MSG_CMD = "cmd";
/**
* 消息json key:msgId
*/
public static final String MSG_ID = "msgId";
/**
* 消息json key:msgTxt
*/
public static final String MSG_TXT = "msgTxt";
/**
* 消息json key:userId
*/
public static final String MSG_USER_ID = "userId";
/**
* 消息类型 heartcheck
*/
public static final String CMD_CHECK = "heartcheck";
/**
* 消息类型 user 用户消息
*/
public static final String CMD_USER = "user";
/**
* 消息类型 topic 系统通知
*/
public static final String CMD_TOPIC = "topic";
/**
* 消息类型 email
*/
public static final String CMD_EMAIL = "email";
/**
* 消息类型 meetingsign 会议签到
*/
public static final String CMD_SIGN = "sign";
/**
* 消息类型 新闻发布/取消
*/
public static final String NEWS_PUBLISH = "publish";
}
@@ -0,0 +1,64 @@
package digital.base.constant;
public interface ZitaCommonConstant {
/**
* 性别男
*/
public static final String sex_male = "male";
/**
* 性别女
*/
public static final String sex_female = "female";
/**
* 性别男 hairs
*/
public static final String sex_male_hairs = "[\"nan_tf_69\", \"nan_tf_92\", \"nan_tf_102\", \"nan_tf_142\", \"nan_tf_129\"]";
/**
* 性别女 hairs
*/
public static final String sex_female_hairs ="[\"nv_tf_128\", \"nv_tf_175\", \"nv_tf_132\", \"nv_tf_159\", \"nv_tf_161\"]";
/**
* 正常状态
*/
public static final String STATUS_NORMAL = "200";
/**
* 生成图片和模型 1
*/
public static final String TASK_TYPE_PICTURE = "1";
/**
* 生成视频 2
*/
public static final String TASK_TYPE_VIDEO = "2";
/**
* 新用户注册送5次试用机会
*/
public static final Integer New_register_member_try_times = 5;
/**
* 购买卡类型-试用
*/
public static final String MEMBER_TYPE_TRY_CARD = "1";
/**
* 购买卡类型-次卡
*/
public static final String MEMBER_TYPE_SUB_CARD = "2";
/**
* 购买卡类型-月卡
*/
public static final String MEMBER_TYPE_MONTH_CARD = "3";
/**
* 购买卡类型-年卡
*/
public static final String MEMBER_TYPE_YEAR_CARD = "4";
}
@@ -0,0 +1,151 @@
package digital.base.enums;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* online表单枚举 代码生成器用到
*
* @author: smcp
*/
public enum CgformEnum {
/**
* 单表
*/
ONE(1, "one", "/jeecg/code-template-online", "default.one", "经典风格"),
/**
* 多表
*/
MANY(2, "many", "/jeecg/code-template-online", "default.onetomany", "经典风格"),
/**
* 多表
*/
ERP(2, "erp", "/jeecg/code-template-online", "erp.onetomany", "ERP风格"),
/**
* 多表(jvxe风格)
*/
JVXE_TABLE(2, "jvxe", "/jeecg/code-template-online", "jvxe.onetomany", "JVXE风格"),
/**
* 多表(内嵌子表风格)
*/
INNER_TABLE(2, "innerTable", "/jeecg/code-template-online", "inner-table.onetomany", "内嵌子表风格"),
/**
* 多表(tab风格)
*/
TAB(2, "tab", "/jeecg/code-template-online", "tab.onetomany", "Tab风格"),
/**
* 树形列表
*/
TREE(3, "tree", "/jeecg/code-template-online", "default.tree", "树形列表");
/**
* 类型 1/单表 2/一对多 3/树
*/
int type;
/**
* 编码标识
*/
String code;
/**
* 代码生成器模板路径
*/
String templatePath;
/**
* 代码生成器模板路径
*/
String stylePath;
/**
* 模板风格名称
*/
String note;
/**
* 构造器
*
* @param type 类型 1/单表 2/一对多 3/树
* @param code 模板编码
* @param templatePath 模板路径
* @param stylePath 模板子路径
* @param note
*/
CgformEnum(int type, String code, String templatePath, String stylePath, String note) {
this.type = type;
this.code = code;
this.templatePath = templatePath;
this.stylePath = stylePath;
this.note = note;
}
/**
* 根据code获取模板路径
*
* @param code
* @return
*/
public static String getTemplatePathByConfig(String code) {
return getCgformEnumByConfig(code).templatePath;
}
/**
* 根据code找枚举
*
* @param code
* @return
*/
public static CgformEnum getCgformEnumByConfig(String code) {
for (CgformEnum e : CgformEnum.values()) {
if (e.code.equals(code)) {
return e;
}
}
return null;
}
/**
* 根据类型找所有
*
* @param type
* @return
*/
public static List<Map<String, Object>> getJspModelList(int type) {
List<Map<String, Object>> ls = new ArrayList<Map<String, Object>>();
for (CgformEnum e : CgformEnum.values()) {
if (e.type == type) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("code", e.code);
map.put("note", e.note);
ls.add(map);
}
}
return ls;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getTemplatePath() {
return templatePath;
}
public void setTemplatePath(String templatePath) {
this.templatePath = templatePath;
}
public String getStylePath() {
return stylePath;
}
public void setStylePath(String stylePath) {
this.stylePath = stylePath;
}
}
@@ -0,0 +1,58 @@
package digital.base.enums;
/**
* U CAN GET A CRAB WHEN U MEET US
* IF GET A QUESTIONPLEASE CONTACT US
* WEBSITE www.crabholder.cn www.crabholder.com
* EMAILcrabholder@163.com.
* CREATED ON 2020/7/13
*/
public enum FileTypeEnum {
picture_1("1", "bmp"),
picture_2("1", "jpg"),
picture_3("1", "png"),
picture_4("1", "tif"),
picture_5("1", "gif"),
picture_6("1", "jpeg"),
document_1("2", "pdf"),
;
FileTypeEnum(String fileType, String extendName) {
this.fileType = fileType;
this.extendName = extendName;
}
public String getFileType() {
return fileType;
}
public void setFileType(String fileType) {
this.fileType = fileType;
}
public String getExtendName() {
return extendName;
}
public void setExtendName(String extendName) {
this.extendName = extendName;
}
private String fileType;
private String extendName;
public static FileTypeEnum codeIn(String extendName) {
if (extendName == null) {
return null;
} else {
for (FileTypeEnum em : FileTypeEnum.values()) {
if (em.getExtendName().equals(extendName)) {
return em;
}
}
return null;
}
}
}
@@ -0,0 +1,74 @@
package digital.base.enums;
import java.util.Arrays;
import java.util.List;
/**
* U CAN GET A CRAB WHEN U MEET US
* IF GET A QUESTIONPLEASE CONTACT US
* WEBSITE www.crabholder.cn www.crabholder.com
* EMAILcrabholder@163.com.
* CREATED ON 2020/7/13
*/
public enum FileTypeKSFEnum {
IDCACRD_1(1,"idcard1","sys_user","id","身份证正面"),
IDCACRD_2(2,"idcard2","sys_user","id","身份证反面"),
IMPORTPERSON(3,"importperson","sys_user","id",""),
IMPORTENDRESULT(4,"importEndResult","insurance_case","id",""),
EXPORTJT(5,"exportjt","insurance_case","id",""),
EXPORTWT(6,"exportwt","insurance_case","id",""),
USERCHANGE(7,"userchange","sys_user","id",""),
CASEDETAILFILE(8,"casedetailfile","caseid","id",""),
BANKFRONT(9,"bank1","sys_user","id","银行卡正面"),
BANKBACk(10,"bank2","sys_user","id","银行卡反面"),
;
FileTypeKSFEnum(Integer key, String value, String tableName, String tableId, String name) {
this.key = key;
this.value = value;
this.tableName = tableName;
this.tableId = tableId;
this.name = name;
}
private Integer key;
private String value;
private String tableName;
private String tableId;
private String name;
public Integer getKey() {
return key;
}
public String getValue() {
return value;
}
public String getTableName() {
return tableName;
}
public String getTableId() {
return tableId;
}
public String getName() {
return name;
}
public static FileTypeKSFEnum codeIn(Integer code) {
if (code == null) {
return null;
} else {
for (FileTypeKSFEnum em : FileTypeKSFEnum.values()) {
if (em.getKey().equals(code)) {
return em;
}
}
return null;
}
}
public static List<Integer> getNeedIdCard(){
return Arrays.asList(IDCACRD_1.getKey(),IDCACRD_2.getKey(),BANKBACk.getKey(),BANKFRONT.getKey());
}
public static List<String> getUserPhotoTypes() {
return Arrays.asList(IDCACRD_1.getKey().toString(), IDCACRD_2.getKey().toString(),BANKBACk.getKey().toString(),BANKFRONT.getKey().toString());
}
public static List<String> getUserEcportCards() {
return Arrays.asList(IDCACRD_1.getKey().toString(), IDCACRD_2.getKey().toString(),BANKBACk.getKey().toString(),BANKFRONT.getKey().toString());
}
}
@@ -0,0 +1,24 @@
package digital.base.enums;
/**
* LowApp 切面注解枚举
*
* @date 2022-1-5
* @author: smcp
*/
public enum LowAppAopEnum {
/**
* 新增方法
*/
ADD,
/**
* 删除方法(包含单个和批量删除)
*/
DELETE,
/**
* Online表单专用:数据库表转Online表单
*/
CGFORM_DB_IMPORT
}
@@ -0,0 +1,19 @@
package digital.base.enums;
/**
* 日志按模块分类
*
* @author: smcp
*/
public enum ModuleType {
/**
* 普通
*/
COMMON,
/**
* online
*/
ONLINE;
}
@@ -0,0 +1,95 @@
package digital.base.enums;
import digital.base.constant.CommonConstant;
/**
* @Description: 操作类型
* @author: smcp
* @date: 2022/3/31 10:05
*/
public enum OperateTypeEnum {
/**
* 列表
*/
LIST(CommonConstant.OPERATE_TYPE_1, "list"),
/**
* 新增
*/
ADD(CommonConstant.OPERATE_TYPE_2, "add"),
/**
* 编辑
*/
EDIT(CommonConstant.OPERATE_TYPE_3, "edit"),
/**
* 删除
*/
DELETE(CommonConstant.OPERATE_TYPE_4, "delete"),
/**
* 导入
*/
IMPORT(CommonConstant.OPERATE_TYPE_5, "import"),
/**
* 导出
*/
EXPORT(CommonConstant.OPERATE_TYPE_6, "export");
/**
* 类型 1列表,2新增,3编辑,4删除,5导入,6导出
*/
int type;
/**
* 编码(请求方式)
*/
String code;
/**
* 构造器
*
* @param type 类型
* @param code 编码(请求方式)
*/
OperateTypeEnum(int type, String code) {
this.type = type;
this.code = code;
}
/**
* 根据请求名称匹配
*
* @param methodName 请求名称
* @return Integer 类型
*/
public static Integer getTypeByMethodName(String methodName) {
for (OperateTypeEnum e : OperateTypeEnum.values()) {
if (methodName.startsWith(e.getCode())) {
return e.getType();
}
}
return CommonConstant.OPERATE_TYPE_1;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
}
@@ -0,0 +1,15 @@
package digital.base.enums;
/**
* 基础消息类
* U CAN GET A CRAB WHEN U MEET US
* IF GET A QUESTIONPLEASE CONTACT US
* WEBSITE www.crabholder.cn www.crabholder.com
* EMAILcrabholder@163.com.
* CREATED ON 2020/6/27
*/
public interface SMCodeMessage {
Integer getKey();
String getValue();
}
@@ -0,0 +1,108 @@
package digital.base.enums;
/**
* @Description: 异常错误信息定义
* @author: zyf
* @date: 2022/4/14 10:05
*/
public enum SentinelErrorInfoEnum {
/**
* 流控异常
*/
FlowException("访问频繁,请稍候再试"),
/**
* 热点参数异常
*/
ParamFlowException("热点参数限流"),
/**
* 系统规则限流或降级
*/
SystemBlockException("系统规则限流或降级"),
/**
* 授权规则不通过
*/
AuthorityException("授权规则不通过"),
/**
* 授权规则不通过
*/
UnknownError("未知异常"),
/**
* 服务降级
*/
DegradeException("服务降级");
/**
* 错误信息
*/
String error;
/**
* 错误代码
*/
Integer code;
public String getError() {
return error;
}
public void setError(String error) {
this.error = error;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
/**
* 构造器
*
* @param error 错误信息
* @param code 错误代码
*/
SentinelErrorInfoEnum(String error, Integer code) {
this.error = error;
this.code = code;
}
/**
* 构造器
*
* @param error 错误信息
*/
SentinelErrorInfoEnum(String error) {
this.error = error;
this.code = 500;
}
/**
* 根据异常名称匹配
*
* @param throwable 异常
* @return String 错误信息
*/
public static SentinelErrorInfoEnum getErrorByException(Throwable throwable) {
if(throwable==null){
return null;
}
String exceptionClass=throwable.getClass().getSimpleName();
for (SentinelErrorInfoEnum e : SentinelErrorInfoEnum.values()) {
if (exceptionClass.equals(e.name())) {
return e;
}
}
return null;
}
}
@@ -0,0 +1,66 @@
package digital.base.enums;
/**
* @Author scott
* @Date 2020/1/14 13:36
* @Description: 请求URL与菜单路由URL转换规则(方便于采用菜单路由URL来配置数据权限规则)
*/
public enum UrlMatchEnum {
/**求URL与菜单路由URL转换规则 /online/cgform/api/getData/ */
CGFORM_DATA("/online/cgform/api/getData/", "/online/cgformList/"),
/**求URL与菜单路由URL转换规则 /online/cgform/api/exportXls/ */
CGFORM_EXCEL_DATA("/online/cgform/api/exportXls/", "/online/cgformList/"),
/**求URL与菜单路由URL转换规则 /online/cgform/api/getTreeData/ */
CGFORM_TREE_DATA("/online/cgform/api/getTreeData/", "/online/cgformList/"),
/**求URL与菜单路由URL转换规则 /online/cgreport/api/getColumnsAndData/ */
CGREPORT_DATA("/online/cgreport/api/getColumnsAndData/", "/online/cgreport/"),
/**求URL与菜单路由URL转换规则 /online/cgreport/api/exportXls/ */
CGREPORT_EXCEL_DATA("/online/cgreport/api/exportXls/", "/online/cgreport/"),
/**求URL与菜单路由URL转换规则 /online/cgreport/api/exportManySheetXls/ */
CGREPORT_EXCEL_DATA2("/online/cgreport/api/exportManySheetXls/", "/online/cgreport/");
UrlMatchEnum(String url, String matchUrl) {
this.url = url;
this.matchUrl = matchUrl;
}
/**
* Request 请求 URL前缀
*/
private String url;
/**
* 菜单路由 URL前缀 (对应菜单路径)
*/
private String matchUrl;
/**
* 根据req url 获取到菜单配置路径(前端页面路由URL)
*
* @param url
* @return
*/
public static String getMatchResultByUrl(String url) {
//获取到枚举
UrlMatchEnum[] values = UrlMatchEnum.values();
//加强for循环进行遍历操作
for (UrlMatchEnum lr : values) {
//如果遍历获取的type和参数type一致
if (url.indexOf(lr.url) != -1) {
//返回type对象的desc
return url.replace(lr.url, lr.matchUrl);
}
}
return null;
}
public String getMatchUrl() {
return matchUrl;
}
// public static void main(String[] args) {
// /**
// * 比如request真实请求URL: /online/cgform/api/getData/81fcf7d8922d45069b0d5ba983612d3a
// * 转换匹配路由URL后(对应配置的菜单路径):/online/cgformList/81fcf7d8922d45069b0d5ba983612d3a
// */
// System.out.println(UrlMatchEnum.getMatchResultByUrl("/online/cgform/api/getData/81fcf7d8922d45069b0d5ba983612d3a"));
// }
}
@@ -0,0 +1,41 @@
package digital.base.enums;
/**
* U CAN GET A CRAB WHEN U MEET US
* IF GET A QUESTIONPLEASE CONTACT US
* WEBSITE www.crabholder.cn www.crabholder.com
* EMAILcrabholder@163.com.
* CREATED ON 2020/6/27
*/
public enum YesOrNoEnum implements SMCodeMessage{
YES(1,""),
NO(0,"");
YesOrNoEnum(Integer key, String value) {
this.key = key;
this.value = value;
}
private Integer key;
private String value;
@Override
public Integer getKey() {
return key;
}
@Override
public String getValue() {
return value;
}
public static YesOrNoEnum codeIn(Integer code) {
if (code == null) {
return null;
} else {
for (YesOrNoEnum em : YesOrNoEnum.values()) {
if (em.getKey().equals(code)) {
return em;
}
}
return null;
}
}
}
@@ -0,0 +1,22 @@
package digital.base.handler;
import com.alibaba.fastjson.JSONObject;
/**
* 填值规则接口
*
* @author Yan_东
* 如需使用填值规则功能,规则实现类必须实现此接口
*/
public interface IFillRuleHandler {
/**
* 填值规则
* @param params 页面配置固定参数
* @param formData 动态表单参数
* @return
*/
public Object execute(JSONObject params, JSONObject formData);
}
@@ -0,0 +1,92 @@
package digital.base.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
/**
* <p>
* 在线用户信息
* </p>
*
* @Author scott
* @since 2018-12-20
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class LoginUser {
private String id;
@ApiModelProperty(value = "discordId")
private String discordId;
@ApiModelProperty(value = "roleType")
private String roleType;
@ApiModelProperty(value = "appId")
private String appId;
@ApiModelProperty(value = "姓名")
private String username;
@ApiModelProperty(value = "剩下使用次数")
private BigDecimal remainNum;
/**
* 登录人名字
*/
private String realname;
/**
* 登录人密码
*/
private String password;
/**
* 头像
*/
private String avatar;
private String roleId;
/**
* 生日
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date birthday;
/**
* 性别(1:男 2:女)
*/
private Integer sex;
/**
* 电子邮件
*/
private String email;
/**
* 电话
*/
private String phone;
/**
* 状态(1:正常 2:冻结
*/
private Integer status;
private Integer delFlag;
/**
* 创建时间
*/
private Date createTime;
private String telephone;
}
@@ -0,0 +1,241 @@
package digital.base.vo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import digital.base.constant.CommonConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 接口返回数据格式
*
* @author scott
* @email jeecgos@163.com
* @date 2019年1月19日
*/
@Data
@ApiModel(value = "接口返回对象", description = "接口返回对象")
public class Result<T> implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 成功标志
*/
@ApiModelProperty(value = "成功标志")
private boolean success = true;
/**
* 返回处理消息
*/
@ApiModelProperty(value = "返回处理消息")
private String message = "";
@ApiModelProperty(value = "")
private String requestId;
@ApiModelProperty(value = "处理中的数据条数")
private Integer inProcessCount;
/**
* 返回代码
*/
@ApiModelProperty(value = "返回代码")
private Integer code = 0;
/**
* 返回数据对象 data
*/
@ApiModelProperty(value = "返回数据对象")
private T result;
/**
* 时间戳
*/
@ApiModelProperty(value = "时间戳")
private long timestamp = System.currentTimeMillis();
@JsonIgnore
private String onlTable;
public Result() {
}
/**
* 兼容VUE3版token失效不跳转登录页面
*
* @param code
* @param message
*/
public Result(Integer code, String message) {
this.code = code;
this.message = message;
}
public static <T> Result<T> ok() {
Result<T> r = new Result<T>();
r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200);
return r;
}
public static <T> Result<T> ok(String msg) {
Result<T> r = new Result<T>();
r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200);
//Result OK(String msg)方法会造成兼容性问题 issues/I4IP3D
r.setResult((T) msg);
r.setMessage(null);
return r;
}
public static <T> Result<T> ok(T data, String requestId) {
Result<T> r = new Result<T>();
r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200);
r.setResult(data);
r.setRequestId(requestId);
return r;
}
public static <T> Result<T> ok(T data, String requestId, Integer inProcessCount) {
Result<T> r = new Result<T>();
r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200);
r.setResult(data);
r.setRequestId(requestId);
r.setInProcessCount(inProcessCount);
return r;
}
public static <T> Result<T> ok(T data) {
Result<T> r = new Result<T>();
r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200);
r.setResult(data);
return r;
}
public static <T> Result<T> OK() {
Result<T> r = new Result<T>();
r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200);
return r;
}
/**
* 此方法是为了兼容升级所创建
*
* @param msg
* @param <T>
* @return
*/
public static <T> Result<T> OK(String msg) {
Result<T> r = new Result<T>();
r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200);
r.setMessage(msg);
//Result OK(String msg)方法会造成兼容性问题 issues/I4IP3D
r.setResult((T) msg);
return r;
}
public static <T> Result<T> OK(T data) {
Result<T> r = new Result<T>();
r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200);
r.setResult(data);
return r;
}
public static <T> Result<T> OK(T data, String taskId) {
Result<T> r = new Result<T>();
r.setSuccess(true);
r.setRequestId(taskId);
r.setCode(CommonConstant.SC_OK_200);
r.setResult(data);
return r;
}
public static <T> Result<T> OK(String msg, String taskId) {
Result<T> r = new Result<T>();
r.setSuccess(true);
r.setRequestId(taskId);
r.setCode(CommonConstant.SC_OK_200);
r.setMessage(msg);
r.setResult((T) msg);
return r;
}
public static <T> Result<T> OK(String msg, T data) {
Result<T> r = new Result<T>();
r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200);
r.setMessage(msg);
r.setResult(data);
return r;
}
public static <T> Result<T> error(String msg, T data) {
Result<T> r = new Result<T>();
r.setSuccess(false);
r.setCode(CommonConstant.SC_INTERNAL_SERVER_ERROR_500);
r.setMessage(msg);
r.setResult(data);
return r;
}
public static <T> Result<T> error(T data, String msg, String taskId) {
Result<T> r = new Result<T>();
r.setSuccess(false);
r.setCode(CommonConstant.SC_INTERNAL_SERVER_ERROR_500);
r.setMessage(msg);
r.setRequestId(taskId);
r.setResult(data);
return r;
}
public static <T> Result<T> error(String msg) {
return error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, msg);
}
public static <T> Result<T> error(int code, String msg) {
Result<T> r = new Result<T>();
r.setCode(code);
r.setMessage(msg);
r.setSuccess(false);
return r;
}
public static <T> Result<T> error(String msg, String requestId) {
Result<T> r = new Result<T>();
r.setCode(CommonConstant.SC_INTERNAL_SERVER_ERROR_500);
r.setMessage(msg);
r.setRequestId(requestId);
r.setSuccess(false);
return r;
}
/**
* 无权限访问返回结果
*/
public static <T> Result<T> noauth(String msg) {
return error(CommonConstant.SC_JEECG_NO_AUTHZ, msg);
}
public Result<T> success(String message) {
this.message = message;
this.code = CommonConstant.SC_OK_200;
this.success = true;
return this;
}
public Result<T> error500(String message) {
this.message = message;
this.code = CommonConstant.SC_INTERNAL_SERVER_ERROR_500;
this.success = false;
return this;
}
}
@@ -0,0 +1,144 @@
package digital.base.vo;
import java.util.Date;
/**
* <p>
* 菜单权限规则表
* </p>
*
* @Author huangzhilin
* @since 2019-03-29
*/
public class SysPermissionDataRuleModel {
/**
* id
*/
private String id;
/**
* 对应的菜单id
*/
private String permissionId;
/**
* 规则名称
*/
private String ruleName;
/**
* 字段
*/
private String ruleColumn;
/**
* 条件
*/
private String ruleConditions;
/**
* 规则值
*/
private String ruleValue;
/**
* 创建时间
*/
private Date createTime;
/**
* 创建人
*/
private String createBy;
/**
* 修改时间
*/
private Date updateTime;
/**
* 修改人
*/
private String updateBy;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getPermissionId() {
return permissionId;
}
public void setPermissionId(String permissionId) {
this.permissionId = permissionId;
}
public String getRuleName() {
return ruleName;
}
public void setRuleName(String ruleName) {
this.ruleName = ruleName;
}
public String getRuleColumn() {
return ruleColumn;
}
public void setRuleColumn(String ruleColumn) {
this.ruleColumn = ruleColumn;
}
public String getRuleConditions() {
return ruleConditions;
}
public void setRuleConditions(String ruleConditions) {
this.ruleConditions = ruleConditions;
}
public String getRuleValue() {
return ruleValue;
}
public void setRuleValue(String ruleValue) {
this.ruleValue = ruleValue;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
}