若依 3.0
This commit is contained in:
		| @@ -0,0 +1,124 @@ | ||||
| package com.ruoyi.common.constant; | ||||
|  | ||||
| /** | ||||
|  * 通用常量信息 | ||||
|  *  | ||||
|  * @author ruoyi | ||||
|  */ | ||||
| public class Constants | ||||
| { | ||||
|     /** | ||||
|      * UTF-8 字符集 | ||||
|      */ | ||||
|     public static final String UTF8 = "UTF-8"; | ||||
|  | ||||
|     /** | ||||
|      * GBK 字符集 | ||||
|      */ | ||||
|     public static final String GBK = "GBK"; | ||||
|  | ||||
|     /** | ||||
|      * http请求 | ||||
|      */ | ||||
|     public static final String HTTP = "http://"; | ||||
|  | ||||
|     /** | ||||
|      * https请求 | ||||
|      */ | ||||
|     public static final String HTTPS = "https://"; | ||||
|  | ||||
|     /** | ||||
|      * 通用成功标识 | ||||
|      */ | ||||
|     public static final String SUCCESS = "0"; | ||||
|  | ||||
|     /** | ||||
|      * 通用失败标识 | ||||
|      */ | ||||
|     public static final String FAIL = "1"; | ||||
|  | ||||
|     /** | ||||
|      * 登录成功 | ||||
|      */ | ||||
|     public static final String LOGIN_SUCCESS = "Success"; | ||||
|  | ||||
|     /** | ||||
|      * 注销 | ||||
|      */ | ||||
|     public static final String LOGOUT = "Logout"; | ||||
|  | ||||
|     /** | ||||
|      * 登录失败 | ||||
|      */ | ||||
|     public static final String LOGIN_FAIL = "Error"; | ||||
|  | ||||
|     /** | ||||
|      * 验证码 redis key | ||||
|      */ | ||||
|     public static final String CAPTCHA_CODE_KEY = "captcha_codes:"; | ||||
|  | ||||
|     /** | ||||
|      * 登录用户 redis key | ||||
|      */ | ||||
|     public static final String LOGIN_TOKEN_KEY = "login_tokens:"; | ||||
|  | ||||
|     /** | ||||
|      * 验证码有效期(分钟) | ||||
|      */ | ||||
|     public static final Integer CAPTCHA_EXPIRATION = 2; | ||||
|  | ||||
|     /** | ||||
|      * 令牌 | ||||
|      */ | ||||
|     public static final String TOKEN = "token"; | ||||
|  | ||||
|     /** | ||||
|      * 令牌前缀 | ||||
|      */ | ||||
|     public static final String TOKEN_PREFIX = "Bearer "; | ||||
|  | ||||
|     /** | ||||
|      * 令牌前缀 | ||||
|      */ | ||||
|     public static final String LOGIN_USER_KEY = "login_user_key"; | ||||
|  | ||||
|     /** | ||||
|      * 用户ID | ||||
|      */ | ||||
|     public static final String JWT_USERID = "userid"; | ||||
|  | ||||
|     /** | ||||
|      * 用户名称 | ||||
|      */ | ||||
|     public static final String JWT_USERNAME = "sub"; | ||||
|  | ||||
|     /** | ||||
|      * 用户头像 | ||||
|      */ | ||||
|     public static final String JWT_AVATAR = "avatar"; | ||||
|  | ||||
|     /** | ||||
|      * 创建时间 | ||||
|      */ | ||||
|     public static final String JWT_CREATED = "created"; | ||||
|  | ||||
|     /** | ||||
|      * 用户权限 | ||||
|      */ | ||||
|     public static final String JWT_AUTHORITIES = "authorities"; | ||||
|  | ||||
|     /** | ||||
|      * 参数管理 cache key | ||||
|      */ | ||||
|     public static final String SYS_CONFIG_KEY = "sys_config:"; | ||||
|  | ||||
|     /** | ||||
|      * 字典管理 cache key | ||||
|      */ | ||||
|     public static final String SYS_DICT_KEY = "sys_dict:"; | ||||
|  | ||||
|     /** | ||||
|      * 资源映射路径 前缀 | ||||
|      */ | ||||
|     public static final String RESOURCE_PREFIX = "/profile"; | ||||
| } | ||||
| @@ -0,0 +1,94 @@ | ||||
| package com.ruoyi.common.constant; | ||||
|  | ||||
| /** | ||||
|  * 代码生成通用常量 | ||||
|  *  | ||||
|  * @author ruoyi | ||||
|  */ | ||||
| public class GenConstants | ||||
| { | ||||
|     /** 单表(增删改查) */ | ||||
|     public static final String TPL_CRUD = "crud"; | ||||
|  | ||||
|     /** 树表(增删改查) */ | ||||
|     public static final String TPL_TREE = "tree"; | ||||
|  | ||||
|     /** 树编码字段 */ | ||||
|     public static final String TREE_CODE = "treeCode"; | ||||
|  | ||||
|     /** 树父编码字段 */ | ||||
|     public static final String TREE_PARENT_CODE = "treeParentCode"; | ||||
|  | ||||
|     /** 树名称字段 */ | ||||
|     public static final String TREE_NAME = "treeName"; | ||||
|  | ||||
|     /** 数据库字符串类型 */ | ||||
|     public static final String[] COLUMNTYPE_STR = { "char", "varchar", "narchar", "varchar2", "tinytext", "text", | ||||
|             "mediumtext", "longtext" }; | ||||
|  | ||||
|     /** 数据库时间类型 */ | ||||
|     public static final String[] COLUMNTYPE_TIME = { "datetime", "time", "date", "timestamp" }; | ||||
|  | ||||
|     /** 数据库数字类型 */ | ||||
|     public static final String[] COLUMNTYPE_NUMBER = { "tinyint", "smallint", "mediumint", "int", "number", "integer", | ||||
|             "bigint", "float", "float", "double", "decimal" }; | ||||
|  | ||||
|     /** 页面不需要编辑字段 */ | ||||
|     public static final String[] COLUMNNAME_NOT_EDIT = { "id", "create_by", "create_time", "del_flag" }; | ||||
|  | ||||
|     /** 页面不需要显示的列表字段 */ | ||||
|     public static final String[] COLUMNNAME_NOT_LIST = { "id", "create_by", "create_time", "del_flag", "update_by", | ||||
|             "update_time" }; | ||||
|  | ||||
|     /** 页面不需要查询字段 */ | ||||
|     public static final String[] COLUMNNAME_NOT_QUERY = { "id", "create_by", "create_time", "del_flag", "update_by", | ||||
|             "update_time", "remark" }; | ||||
|  | ||||
|     /** Entity基类字段 */ | ||||
|     public static final String[] BASE_ENTITY = { "createBy", "createTime", "updateBy", "updateTime", "remark" }; | ||||
|  | ||||
|     /** Tree基类字段 */ | ||||
|     public static final String[] TREE_ENTITY = { "parentName", "parentId", "orderNum", "ancestors", "children" }; | ||||
|  | ||||
|     /** 文本框 */ | ||||
|     public static final String HTML_INPUT = "input"; | ||||
|  | ||||
|     /** 文本域 */ | ||||
|     public static final String HTML_TEXTAREA = "textarea"; | ||||
|  | ||||
|     /** 下拉框 */ | ||||
|     public static final String HTML_SELECT = "select"; | ||||
|  | ||||
|     /** 单选框 */ | ||||
|     public static final String HTML_RADIO = "radio"; | ||||
|  | ||||
|     /** 复选框 */ | ||||
|     public static final String HTML_CHECKBOX = "checkbox"; | ||||
|  | ||||
|     /** 日期控件 */ | ||||
|     public static final String HTML_DATETIME = "datetime"; | ||||
|  | ||||
|     /** 字符串类型 */ | ||||
|     public static final String TYPE_STRING = "String"; | ||||
|  | ||||
|     /** 整型 */ | ||||
|     public static final String TYPE_INTEGER = "Integer"; | ||||
|  | ||||
|     /** 长整型 */ | ||||
|     public static final String TYPE_LONG = "Long"; | ||||
|  | ||||
|     /** 浮点型 */ | ||||
|     public static final String TYPE_DOUBLE = "Double"; | ||||
|  | ||||
|     /** 高精度计算类型 */ | ||||
|     public static final String TYPE_BIGDECIMAL = "BigDecimal"; | ||||
|  | ||||
|     /** 时间类型 */ | ||||
|     public static final String TYPE_DATE = "Date"; | ||||
|  | ||||
|     /** 模糊查询 */ | ||||
|     public static final String QUERY_LIKE = "LIKE"; | ||||
|  | ||||
|     /** 需要 */ | ||||
|     public static final String REQUIRE = "1"; | ||||
| } | ||||
| @@ -0,0 +1,89 @@ | ||||
| package com.ruoyi.common.constant; | ||||
|  | ||||
| /** | ||||
|  * 返回状态码 | ||||
|  *  | ||||
|  * @author ruoyi | ||||
|  */ | ||||
| public class HttpStatus | ||||
| { | ||||
|     /** | ||||
|      * 操作成功 | ||||
|      */ | ||||
|     public static final int SUCCESS = 200; | ||||
|  | ||||
|     /** | ||||
|      * 对象创建成功 | ||||
|      */ | ||||
|     public static final int CREATED = 201; | ||||
|  | ||||
|     /** | ||||
|      * 请求已经被接受 | ||||
|      */ | ||||
|     public static final int ACCEPTED = 202; | ||||
|  | ||||
|     /** | ||||
|      * 操作已经执行成功,但是没有返回数据 | ||||
|      */ | ||||
|     public static final int NO_CONTENT = 204; | ||||
|  | ||||
|     /** | ||||
|      * 资源已被移除 | ||||
|      */ | ||||
|     public static final int MOVED_PERM = 301; | ||||
|  | ||||
|     /** | ||||
|      * 重定向 | ||||
|      */ | ||||
|     public static final int SEE_OTHER = 303; | ||||
|  | ||||
|     /** | ||||
|      * 资源没有被修改 | ||||
|      */ | ||||
|     public static final int NOT_MODIFIED = 304; | ||||
|  | ||||
|     /** | ||||
|      * 参数列表错误(缺少,格式不匹配) | ||||
|      */ | ||||
|     public static final int BAD_REQUEST = 400; | ||||
|  | ||||
|     /** | ||||
|      * 未授权 | ||||
|      */ | ||||
|     public static final int UNAUTHORIZED = 401; | ||||
|  | ||||
|     /** | ||||
|      * 访问受限,授权过期 | ||||
|      */ | ||||
|     public static final int FORBIDDEN = 403; | ||||
|  | ||||
|     /** | ||||
|      * 资源,服务未找到 | ||||
|      */ | ||||
|     public static final int NOT_FOUND = 404; | ||||
|  | ||||
|     /** | ||||
|      * 不允许的http方法 | ||||
|      */ | ||||
|     public static final int BAD_METHOD = 405; | ||||
|  | ||||
|     /** | ||||
|      * 资源冲突,或者资源被锁 | ||||
|      */ | ||||
|     public static final int CONFLICT = 409; | ||||
|  | ||||
|     /** | ||||
|      * 不支持的数据,媒体类型 | ||||
|      */ | ||||
|     public static final int UNSUPPORTED_TYPE = 415; | ||||
|  | ||||
|     /** | ||||
|      * 系统内部错误 | ||||
|      */ | ||||
|     public static final int ERROR = 500; | ||||
|  | ||||
|     /** | ||||
|      * 接口未实现 | ||||
|      */ | ||||
|     public static final int NOT_IMPLEMENTED = 501; | ||||
| } | ||||
| @@ -0,0 +1,50 @@ | ||||
| package com.ruoyi.common.constant; | ||||
|  | ||||
| /** | ||||
|  * 任务调度通用常量 | ||||
|  *  | ||||
|  * @author ruoyi | ||||
|  */ | ||||
| public class ScheduleConstants | ||||
| { | ||||
|     public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME"; | ||||
|  | ||||
|     /** 执行目标key */ | ||||
|     public static final String TASK_PROPERTIES = "TASK_PROPERTIES"; | ||||
|  | ||||
|     /** 默认 */ | ||||
|     public static final String MISFIRE_DEFAULT = "0"; | ||||
|  | ||||
|     /** 立即触发执行 */ | ||||
|     public static final String MISFIRE_IGNORE_MISFIRES = "1"; | ||||
|  | ||||
|     /** 触发一次执行 */ | ||||
|     public static final String MISFIRE_FIRE_AND_PROCEED = "2"; | ||||
|  | ||||
|     /** 不触发立即执行 */ | ||||
|     public static final String MISFIRE_DO_NOTHING = "3"; | ||||
|  | ||||
|     public enum Status | ||||
|     { | ||||
|         /** | ||||
|          * 正常 | ||||
|          */ | ||||
|         NORMAL("0"), | ||||
|         /** | ||||
|          * 暂停 | ||||
|          */ | ||||
|         PAUSE("1"); | ||||
|  | ||||
|         private String value; | ||||
|  | ||||
|         private Status(String value) | ||||
|         { | ||||
|             this.value = value; | ||||
|         } | ||||
|  | ||||
|         public String getValue() | ||||
|         { | ||||
|             return value; | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,60 @@ | ||||
| package com.ruoyi.common.constant; | ||||
|  | ||||
| /** | ||||
|  * 用户常量信息 | ||||
|  *  | ||||
|  * @author ruoyi | ||||
|  */ | ||||
| public class UserConstants | ||||
| { | ||||
|     /** | ||||
|      * 平台内系统用户的唯一标志 | ||||
|      */ | ||||
|     public static final String SYS_USER = "SYS_USER"; | ||||
|  | ||||
|     /** 正常状态 */ | ||||
|     public static final String NORMAL = "0"; | ||||
|  | ||||
|     /** 异常状态 */ | ||||
|     public static final String EXCEPTION = "1"; | ||||
|  | ||||
|     /** 用户封禁状态 */ | ||||
|     public static final String USER_DISABLE = "1"; | ||||
|  | ||||
|     /** 角色封禁状态 */ | ||||
|     public static final String ROLE_DISABLE = "1"; | ||||
|  | ||||
|     /** 部门正常状态 */ | ||||
|     public static final String DEPT_NORMAL = "0"; | ||||
|  | ||||
|     /** 部门停用状态 */ | ||||
|     public static final String DEPT_DISABLE = "1"; | ||||
|  | ||||
|     /** 字典正常状态 */ | ||||
|     public static final String DICT_NORMAL = "0"; | ||||
|  | ||||
|     /** 是否为系统默认(是) */ | ||||
|     public static final String YES = "Y"; | ||||
|  | ||||
|     /** 是否菜单外链(是) */ | ||||
|     public static final String YES_FRAME = "0"; | ||||
|  | ||||
|     /** 是否菜单外链(否) */ | ||||
|     public static final String NO_FRAME = "1"; | ||||
|  | ||||
|     /** 菜单类型(目录) */ | ||||
|     public static final String TYPE_DIR = "M"; | ||||
|  | ||||
|     /** 菜单类型(菜单) */ | ||||
|     public static final String TYPE_MENU = "C"; | ||||
|  | ||||
|     /** 菜单类型(按钮) */ | ||||
|     public static final String TYPE_BUTTON = "F"; | ||||
|  | ||||
|     /** Layout组件标识 */ | ||||
|     public final static String LAYOUT = "Layout"; | ||||
|  | ||||
|     /** 校验返回结果码 */ | ||||
|     public final static String UNIQUE = "0"; | ||||
|     public final static String NOT_UNIQUE = "1"; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user