update 常量类 接口化

master
疯狂的狮子li 4 years ago
parent 408f5055a9
commit 5322f5f707

@ -6,130 +6,131 @@ package com.ruoyi.common.constant;
*
* @author ruoyi
*/
public class Constants {
public interface Constants {
/**
* UTF-8
*/
public static final String UTF8 = "UTF-8";
String UTF8 = "UTF-8";
/**
* GBK
*/
public static final String GBK = "GBK";
String GBK = "GBK";
/**
* http
*/
public static final String HTTP = "http://";
String HTTP = "http://";
/**
* https
*/
public static final String HTTPS = "https://";
String HTTPS = "https://";
/**
*
*/
public static final String SUCCESS = "0";
String SUCCESS = "0";
/**
*
*/
public static final String FAIL = "1";
String FAIL = "1";
/**
*
*/
public static final String LOGIN_SUCCESS = "Success";
String LOGIN_SUCCESS = "Success";
/**
*
*/
public static final String LOGOUT = "Logout";
String LOGOUT = "Logout";
/**
*
*/
public static final String REGISTER = "Register";
String REGISTER = "Register";
/**
*
*/
public static final String LOGIN_FAIL = "Error";
String LOGIN_FAIL = "Error";
/**
* redis key
*/
public static final String CAPTCHA_CODE_KEY = "captcha_codes:";
String CAPTCHA_CODE_KEY = "captcha_codes:";
/**
* redis key
*/
public static final String LOGIN_TOKEN_KEY = "login_tokens:";
String LOGIN_TOKEN_KEY = "login_tokens:";
/**
* redis key
*/
public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";
String REPEAT_SUBMIT_KEY = "repeat_submit:";
/**
* redis key
*/
public static final String RATE_LIMIT_KEY = "rate_limit:";
String RATE_LIMIT_KEY = "rate_limit:";
/**
*
*/
public static final Integer CAPTCHA_EXPIRATION = 2;
Integer CAPTCHA_EXPIRATION = 2;
/**
*
*/
public static final String TOKEN = "token";
String TOKEN = "token";
/**
*
*/
public static final String TOKEN_PREFIX = "Bearer ";
String TOKEN_PREFIX = "Bearer ";
/**
*
*/
public static final String LOGIN_USER_KEY = "login_user_key";
String LOGIN_USER_KEY = "login_user_key";
/**
* ID
*/
public static final String JWT_USERID = "userid";
String JWT_USERID = "userid";
/**
*
*/
public static final String JWT_USERNAME = "sub";
String JWT_USERNAME = "sub";
/**
*
*/
public static final String JWT_AVATAR = "avatar";
String JWT_AVATAR = "avatar";
/**
*
*/
public static final String JWT_CREATED = "created";
String JWT_CREATED = "created";
/**
*
*/
public static final String JWT_AUTHORITIES = "authorities";
String JWT_AUTHORITIES = "authorities";
/**
* cache key
*/
public static final String SYS_CONFIG_KEY = "sys_config:";
String SYS_CONFIG_KEY = "sys_config:";
/**
* cache key
*/
public static final String SYS_DICT_KEY = "sys_dict:";
String SYS_DICT_KEY = "sys_dict:";
}

@ -5,184 +5,184 @@ package com.ruoyi.common.constant;
*
* @author ruoyi
*/
public class GenConstants {
public interface GenConstants {
/**
*
*/
public static final String TPL_CRUD = "crud";
String TPL_CRUD = "crud";
/**
*
*/
public static final String TPL_TREE = "tree";
String TPL_TREE = "tree";
/**
*
*/
public static final String TPL_SUB = "sub";
String TPL_SUB = "sub";
/**
*
*/
public static final String TREE_CODE = "treeCode";
String TREE_CODE = "treeCode";
/**
*
*/
public static final String TREE_PARENT_CODE = "treeParentCode";
String TREE_PARENT_CODE = "treeParentCode";
/**
*
*/
public static final String TREE_NAME = "treeName";
String TREE_NAME = "treeName";
/**
* ID
*/
public static final String PARENT_MENU_ID = "parentMenuId";
String PARENT_MENU_ID = "parentMenuId";
/**
*
*/
public static final String PARENT_MENU_NAME = "parentMenuName";
String PARENT_MENU_NAME = "parentMenuName";
/**
*
*/
public static final String[] COLUMNTYPE_STR = {"char", "varchar", "nvarchar", "varchar2"};
String[] COLUMNTYPE_STR = {"char", "varchar", "nvarchar", "varchar2"};
/**
*
*/
public static final String[] COLUMNTYPE_TEXT = {"tinytext", "text", "mediumtext", "longtext"};
String[] COLUMNTYPE_TEXT = {"tinytext", "text", "mediumtext", "longtext"};
/**
*
*/
public static final String[] COLUMNTYPE_TIME = {"datetime", "time", "date", "timestamp"};
String[] COLUMNTYPE_TIME = {"datetime", "time", "date", "timestamp"};
/**
*
*/
public static final String[] COLUMNTYPE_NUMBER = {"tinyint", "smallint", "mediumint", "int", "number", "integer",
"bit", "bigint", "float", "double", "decimal"};
String[] COLUMNTYPE_NUMBER = {"tinyint", "smallint", "mediumint", "int", "number", "integer",
"bit", "bigint", "float", "double", "decimal"};
/**
* BO
*/
public static final String[] COLUMNNAME_NOT_ADD = {"create_by", "create_time", "del_flag", "update_by",
"update_time", "version"};
String[] COLUMNNAME_NOT_ADD = {"create_by", "create_time", "del_flag", "update_by",
"update_time", "version"};
/**
* BO
*/
public static final String[] COLUMNNAME_NOT_EDIT = {"create_by", "create_time", "del_flag", "update_by",
"update_time", "version"};
String[] COLUMNNAME_NOT_EDIT = {"create_by", "create_time", "del_flag", "update_by",
"update_time", "version"};
/**
* VO
*/
public static final String[] COLUMNNAME_NOT_LIST = {"create_by", "create_time", "del_flag", "update_by",
"update_time", "version"};
String[] COLUMNNAME_NOT_LIST = {"create_by", "create_time", "del_flag", "update_by",
"update_time", "version"};
/**
* BO
*/
public static final String[] COLUMNNAME_NOT_QUERY = {"id", "create_by", "create_time", "del_flag", "update_by",
"update_time", "remark", "version"};
String[] COLUMNNAME_NOT_QUERY = {"id", "create_by", "create_time", "del_flag", "update_by",
"update_time", "remark", "version"};
/**
* Entity
*/
public static final String[] BASE_ENTITY = {"createBy", "createTime", "updateBy", "updateTime"};
String[] BASE_ENTITY = {"createBy", "createTime", "updateBy", "updateTime"};
/**
* Tree
*/
public static final String[] TREE_ENTITY = {"parentName", "parentId", "children"};
String[] TREE_ENTITY = {"parentName", "parentId", "children"};
/**
*
*/
public static final String HTML_INPUT = "input";
String HTML_INPUT = "input";
/**
*
*/
public static final String HTML_TEXTAREA = "textarea";
String HTML_TEXTAREA = "textarea";
/**
*
*/
public static final String HTML_SELECT = "select";
String HTML_SELECT = "select";
/**
*
*/
public static final String HTML_RADIO = "radio";
String HTML_RADIO = "radio";
/**
*
*/
public static final String HTML_CHECKBOX = "checkbox";
String HTML_CHECKBOX = "checkbox";
/**
*
*/
public static final String HTML_DATETIME = "datetime";
String HTML_DATETIME = "datetime";
/**
*
*/
public static final String HTML_IMAGE_UPLOAD = "imageUpload";
String HTML_IMAGE_UPLOAD = "imageUpload";
/**
*
*/
public static final String HTML_FILE_UPLOAD = "fileUpload";
String HTML_FILE_UPLOAD = "fileUpload";
/**
*
*/
public static final String HTML_EDITOR = "editor";
String HTML_EDITOR = "editor";
/**
*
*/
public static final String TYPE_STRING = "String";
String TYPE_STRING = "String";
/**
*
*/
public static final String TYPE_INTEGER = "Integer";
String TYPE_INTEGER = "Integer";
/**
*
*/
public static final String TYPE_LONG = "Long";
String TYPE_LONG = "Long";
/**
*
*/
public static final String TYPE_DOUBLE = "Double";
String TYPE_DOUBLE = "Double";
/**
*
*/
public static final String TYPE_BIGDECIMAL = "BigDecimal";
String TYPE_BIGDECIMAL = "BigDecimal";
/**
*
*/
public static final String TYPE_DATE = "Date";
String TYPE_DATE = "Date";
/**
*
*/
public static final String QUERY_LIKE = "LIKE";
String QUERY_LIKE = "LIKE";
/**
*
*/
public static final String REQUIRE = "1";
String REQUIRE = "1";
}

@ -5,108 +5,108 @@ package com.ruoyi.common.constant;
*
* @author ruoyi
*/
public class UserConstants {
public interface UserConstants {
/**
*
*/
public static final String SYS_USER = "SYS_USER";
String SYS_USER = "SYS_USER";
/**
*
*/
public static final String NORMAL = "0";
String NORMAL = "0";
/**
*
*/
public static final String EXCEPTION = "1";
String EXCEPTION = "1";
/**
*
*/
public static final String USER_DISABLE = "1";
String USER_DISABLE = "1";
/**
*
*/
public static final String ROLE_DISABLE = "1";
String ROLE_DISABLE = "1";
/**
*
*/
public static final String DEPT_NORMAL = "0";
String DEPT_NORMAL = "0";
/**
*
*/
public static final String DEPT_DISABLE = "1";
String DEPT_DISABLE = "1";
/**
*
*/
public static final String DICT_NORMAL = "0";
String DICT_NORMAL = "0";
/**
*
*/
public static final String YES = "Y";
String YES = "Y";
/**
*
*/
public static final String YES_FRAME = "0";
String YES_FRAME = "0";
/**
*
*/
public static final String NO_FRAME = "1";
String NO_FRAME = "1";
/**
*
*/
public static final String TYPE_DIR = "M";
String TYPE_DIR = "M";
/**
*
*/
public static final String TYPE_MENU = "C";
String TYPE_MENU = "C";
/**
*
*/
public static final String TYPE_BUTTON = "F";
String TYPE_BUTTON = "F";
/**
* Layout
*/
public final static String LAYOUT = "Layout";
String LAYOUT = "Layout";
/**
* ParentView
*/
public final static String PARENT_VIEW = "ParentView";
String PARENT_VIEW = "ParentView";
/**
* InnerLink
*/
public final static String INNER_LINK = "InnerLink";
String INNER_LINK = "InnerLink";
/**
*
*/
public final static String UNIQUE = "0";
public final static String NOT_UNIQUE = "1";
String UNIQUE = "0";
String NOT_UNIQUE = "1";
/**
*
*/
public static final int USERNAME_MIN_LENGTH = 2;
public static final int USERNAME_MAX_LENGTH = 20;
int USERNAME_MIN_LENGTH = 2;
int USERNAME_MAX_LENGTH = 20;
/**
*
*/
public static final int PASSWORD_MIN_LENGTH = 5;
public static final int PASSWORD_MAX_LENGTH = 20;
int PASSWORD_MIN_LENGTH = 5;
int PASSWORD_MAX_LENGTH = 20;
}

Loading…
Cancel
Save