first commit

This commit is contained in:
2026-04-17 10:09:03 +08:00
commit 572ad1205f
325 changed files with 30209 additions and 0 deletions

View File

@@ -0,0 +1,90 @@
package com.maibu.constant;
/**
* 缓存的key 常量
*
* @author ruoyi
*/
public class CacheConstants
{
/**
* 登录用户 redis key
*/
public static final String LOGIN_TOKEN_KEY = "login_tokens:";
/**
* 登录用户 redis key
*/
public static final String LOGIN_USERID_KEY = "login_userId:";
/**
* 登录用户 平台 redis key
*/
public static final String LOGIN_USERID_SOURCE_KEY = "login_userId_source:";
/**
* 验证码 redis key
*/
public static final String CAPTCHA_CODE_KEY = "captcha_codes:";
/**
* 参数管理 cache key
*/
public static final String SYS_CONFIG_KEY = "sys_config:";
/**
* 字典管理 cache key
*/
public static final String SYS_DICT_KEY = "sys_dict:";
/**
* 数据库查询 cache key
*/
public static final String SQL_CACHE_KEY = "sql_cache:";
/**
* 防重提交 redis key
*/
public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";
/**
* 限流 redis key
*/
public static final String RATE_LIMIT_KEY = "rate_limit:";
/**
* 登录账户密码错误次数 redis key
*/
public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:";
/**
* 短信登录验证码 redis key
*/
public static final String LOGIN_SMS_CAPTCHA_PHONE = "login_sms_captcha_phone:";
/**
* 邮箱登录验证码 redis key
*/
public static final String LOGIN_EMAIL_CAPTCHA = "login_email_captcha:";
/**
* 微信获取accessToken redis key
*/
public static final String WECHAT_GET_ACCESS_TOKEN_APPID = "wechat_get_accessToken:";
/**
* 短信注册验证码 redis key
*/
public static final String REGISTER_SMS_CAPTCHA_PHONE = "register_sms_captcha_phone:";
/**
* 邮箱注册验证码 redis key
*/
public static final String REGISTER_EMAIL_CAPTCHA = "register_email_captcha:";
/**设备OTA升级实时数据*/
public static final String DEVICE_OTA_DATA = "device:ota:";
}

View File

@@ -0,0 +1,163 @@
package com.maibu.constant;
import io.jsonwebtoken.Claims;
/**
* 通用常量信息
*
* @author ruoyi
*/
public class Constants
{
/**
* UTF-8 字符集
*/
public static final String UTF8 = "UTF-8";
/**
* GBK 字符集
*/
public static final String GBK = "GBK";
/**
* www主域
*/
public static final String WWW = "www.";
/**
* 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 REGISTER = "Register";
/**
* 登录失败
*/
public static final String LOGIN_FAIL = "Error";
/**
* 验证码有效期(分钟)
*/
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 = Claims.SUBJECT;
/**
* 用户头像
*/
public static final String JWT_AVATAR = "avatar";
/**
* 创建时间
*/
public static final String JWT_CREATED = "created";
/**
* 用户权限
*/
public static final String JWT_AUTHORITIES = "authorities";
/**
* 资源映射路径 前缀
*/
public static final String RESOURCE_PREFIX = "/profile";
/**
* RMI 远程方法调用
*/
public static final String LOOKUP_RMI = "rmi:";
/**
* LDAP 远程方法调用
*/
public static final String LOOKUP_LDAP = "ldap:";
/**
* LDAPS 远程方法调用
*/
public static final String LOOKUP_LDAPS = "ldaps:";
/**
* 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
*/
public static final String[] JOB_WHITELIST_STR = { "com.fastbee" };
/**
* 定时任务违规的字符
*/
public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
"org.springframework", "org.apache", "com.fastbee.common.utils.file", "com.fastbee.common.config" };
/**
* 语言类型
*/
public static final String LANGUAGE = "language";
public static final String ZH_CN = "zh-CN";
public static final String EN_US = "en-US";
/**
* 翻译数据类型
*/
public static final String MENU = "menu";
public static final String DICT_DATA = "dict_data";
public static final String DICT_TYPE = "dict_type";
public static final String THINGS_MODEL = "things_model";
public static final String THINGS_MODEL_TEMPLATE = "things_model_template";
/**
* 组态分享缓存token-key
*/
public static final String SCADA_SHARE_KEY = "scada_share_key";
}

View File

@@ -0,0 +1,356 @@
package com.maibu.constant;
/**
* 常量
*
* @author bill
*/
public interface FastBeeConstant {
interface SERVER {
String UFT8 = "UTF-8";
String GB2312 = "GB2312";
String MQTT = "mqtt";
String PORT = "port";
String ADAPTER = "adapter";
String FRAMEDECODER = "frameDecoder";
String DISPATCHER = "dispatcher";
String DECODER = "decoder";
String ENCODER = "encoder";
String MAXFRAMELENGTH = "maxFrameLength";
String SLICER = "slicer";
String DELIMITERS = "delimiters";
String IDLE = "idle";
String WS_PREFIX = "web-";
String WM_PREFIX = "server-";
String FAST_PHONE = "phone-";
/*MQTT平台判定离线时间 keepAlive*1.5 */
Long DEVICE_PING_EXPIRED = 90000L;
}
interface CLIENT {
//加盐
String TOKEN = "fastbee-smart!@#$123";
}
/*webSocket配置*/
interface WS {
String HEART_BEAT = "heartbeat";
String HTTP_SERVER_CODEC = "httpServerCodec";
String AGGREGATOR = "aggregator";
String COMPRESSOR = "compressor";
String PROTOCOL = "protocol";
String MQTT_WEBSOCKET = "mqttWebsocket";
String DECODER = "decoder";
String ENCODER = "encoder";
String BROKER_HANDLER = "brokerHandler";
}
interface TASK {
/**
* 设备上下线任务
*/
String DEVICE_STATUS_TASK = "deviceStatusTask";
/**
* 设备主动上报任务
*/
String DEVICE_UP_MESSAGE_TASK = "deviceUpMessageTask";
/**
* 设备回调任务
*/
String DEVICE_REPLY_MESSAGE_TASK = "deviceReplyMessageTask";
/**
* 设备下行任务
*/
String DEVICE_DOWN_MESSAGE_TASK = "deviceDownMessageTask";
/**
* 服务调用(指令下发)任务
*/
String FUNCTION_INVOKE_TASK = "functionInvokeTask";
/**
* 属性读取任务,区分服务调用
*/
String DEVICE_FETCH_PROP_TASK = "deviceFetchPropTask";
/**
* 设备其他消息处理
*/
String DEVICE_OTHER_TASK = "deviceOtherMsgTask";
/**
* 数据调试任务
*/
String DEVICE_TEST_TASK = "deviceTestMsgTask";
/**
* 消息消费线程
*/
String MESSAGE_CONSUME_TASK = "messageConsumeTask";
/*内部消费线程publish*/
String MESSAGE_CONSUME_TASK_PUB = "messageConsumeTaskPub";
/*内部消费线程Fetch*/
String MESSAGE_CONSUME_TASK_FETCH = "messageConsumeTaskFetch";
/*OTA升级延迟队列*/
String DELAY_UPGRADE_TASK = "delayUpgradeTask";
/*OTA升级线程池*/
String OTA_THREAD_POOL = "otaThreadPoolTaskExecutor";
/**
* 设备错误
*/
String DEVICE_ERROR_MONITOR = "deviceErrorMonitor";
/**
* 设备任务处理线程
*/
String DEVICE_TASK_HANDLER = "deviceTaskHandler";
}
interface MQTT {
String PREDIX = "/+/+";
/*OTA消息回复*/
String OTA_REPLY = "upgrade/reply";
}
/*集群,全局发布的消息类型*/
interface CHANNEL {
/*设备状态*/
String DEVICE_STATUS = "device_status";
/*平台读取属性*/
String PROP_READ = "prop_read";
/*推送消息*/
String PUBLISH = "publish";
/*服务下发*/
String FUNCTION_INVOKE = "function_invoke";
/*事件*/
String EVENT = "event";
/*other*/
String OTHER = "other";
/*Qos1 推送应答*/
String PUBLISH_ACK = "publish_ack";
/*Qos2 发布消息收到*/
String PUB_REC = "pub_rec";
/*Qos 发布消息释放*/
String PUB_REL = "pub_rel";
/*Qos2 发布消息完成*/
String PUB_COMP = "pub_comp";
String UPGRADE = "upgrade";
/*-------------------------ROCKETMQ-------------------------*/
String SUFFIX = "group";
/*设备状态*/
String DEVICE_STATUS_GROUP = DEVICE_STATUS + SUFFIX;
String PROP_READ_GROUP = PROP_READ + SUFFIX;
/*服务下发*/
String FUNCTION_INVOKE_GROUP = FUNCTION_INVOKE + SUFFIX;
/*推送消息*/
String PUBLISH_GROUP = PUBLISH + SUFFIX;
/*Qos1 推送应答*/
String PUBLISH_ACK_GROUP = PUBLISH_ACK + SUFFIX;
/*Qos2 发布消息收到*/
String PUB_REC_GROUP = PUB_REC + SUFFIX;
/*Qos 发布消息释放*/
String PUB_REL_GROUP = PUB_REL + SUFFIX;
/*Qos2 发布消息完成*/
String PUB_COMP_GROUP = PUB_COMP + SUFFIX;
/*OTA升级*/
String UPGRADE_GROUP = UPGRADE + SUFFIX;
}
/**
* redisKey 定义
*/
interface REDIS {
/*在线设备列表*/
String DEVICE_ONLINE_LIST = "device:online:list";
/*设备实时状态key*/
String DEVICE_RUNTIME_DATA = "device:runtime:";
/*通讯协议参数*/
String DEVICE_PROTOCOL_PARAM = "device:param:";
/**
* 设备消息id缓存key
*/
String DEVICE_MESSAGE_ID = "device:messageId:";
/**
* 固件版本key
*/
String FIRMWARE_VERSION = "device:firmware:";
/**
* 设备信息
*/
String DEVICE_MSG = "device:msg:";
/**
* 属性下发回调
*/
String PROP_READ_STORE = "prop:read:store:";
/**
* sip
*/
String RECORDINFO_KEY = "sip:recordinfo:";
String DEVICEID_KEY = "sip:deviceid:";
String STREAM_KEY = "sip:stream:";
String INVITE_KEY = "sip:invite:";
String SIP_CSEQ_PREFIX = "sip:CSEQ:";
String DEFAULT_SIP_CONFIG = "sip:config";
String DEFAULT_MEDIA_CONFIG = "sip:mediaconfig";
/**
* rule
*/
String RULE_SILENT_TIME = "rule:SilentTime";
/**
* 总保留消息
*/
String MESSAGE_RETAIN_TOTAL = "message:retain:total";
/*发送消息数*/
String MESSAGE_SEND_TOTAL = "message:send:total";
/*接收消息数*/
String MESSAGE_RECEIVE_TOTAL = "message:receive:total";
/*连接次数*/
String MESSAGE_CONNECT_TOTAL = "message:connect:total";
/**
* 认证次数
*/
String MESSAGE_AUTH_TOTAL = "message:auth:total";
/**
* 订阅次数
*/
String MESSAGE_SUBSCRIBE_TOTAL = "message:subscribe:total";
/**
* 今日接收消息
*/
String MESSAGE_RECEIVE_TODAY = "message:receive:today";
/**
* 今日发送消息
*/
String MESSAGE_SEND_TODAY = "message:send:today";
/**
* 物模型值缓存
*/
String DEVICE_PRE_KEY = "TSLV:";
/**
* 物模型缓存
*/
String TSL_PRE_KEY = "TSL:";
String MODBUS_PRE_KEY = "MODBUS:";
/**
* modbus缓存指令
*/
String POLL_MODBUS_KEY = "MODBUS:POLL:";
/**
* modbus运行时数据
*/
String MODBUS_RUNTIME = "MODBUS:RUNTIME:";
String MODBUS_LOCK = "MODBUS:LOCK:";
/**
* 通知企业微信应用消息accessToken缓存key
*/
String NOTIFY_WECOM_APPLY_ACCESSTOKEN = "notify:wecom:apply:";
// 场景变量命名空间:Key:SMTV:{sceneModelTagId}
String SCENE_MODEL_TAG_ID = "SMTV:";
/**
* modbus运行时数据
*/
String MODBUS_TCP = "MODBUS:TCP:";
/**
* modbus运行时数据
*/
String MODBUS_TCP_RUNTIME = "MODBUS:TCP:RUNTIME:";
/**
* OTA实时数据
*/
String DEVICE_OTA_DATA = "device:ota:";
}
interface PROTOCOL {
String ModbusRtu = "MODBUS-RTU";
String YinErDa = "YinErDa";
String JsonObject = "JSONOBJECT";
String JsonArray = "JSON";
String ModbusRtuPak = "MODBUS-RTU-PAK";
String NetOTA = "OTA-NET";
String FlowMeter = "FlowMeter";
String RJ45 = "RJ45";
String ModbusToJson = "MODBUS-JSON";
String ModbusToJsonHP = "MODBUS-JSON-HP";
String ModbusToJsonZQWL = "MODBUS-JSON-ZQWL";
String JsonObject_ChenYi = "JSONOBJECT-CHENYI";
String GEC6100D = "MODBUS-JSON-GEC6100D";
String SGZ = "SGZ";
String CH = "CH";
String ModbusTcp = "MODBUS-TCP";
}
interface URL {
/**
* 微信小程序订阅消息推送url前缀
*/
String WX_MINI_PROGRAM_PUSH_URL_PREFIX = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send";
/**
* 微信网站、移动应用登录获取用户access_token
*/
String WX_GET_ACCESS_TOKEN_URL_PREFIX = "https://api.weixin.qq.com/sns/oauth2/access_token";
/**
* 微信小程序登录获取用户会话参数
*/
String WX_MINI_PROGRAM_GET_USER_SESSION_URL_PREFIX = "https://api.weixin.qq.com/sns/jscode2session";
/**
* 微信小程序、公众号获取access_token
*/
String WX_MINI_PROGRAM_GET_ACCESS_TOKEN_URL_PREFIX = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential";
/**
* 微信获取用户信息
*/
String WX_GET_USER_INFO_URL_PREFIX = "https://api.weixin.qq.com/sns/userinfo";
/**
* 获取用户手机号信息
*/
String WX_GET_USER_PHONE_URL_PREFIX = "https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token=";
/**
* 企业微信获取accessToken
*/
String WECOM_GET_ACCESSTOKEN = "https://qyapi.weixin.qq.com/cgi-bin/gettoken";
/**
* 企业微信发送应用消息
*/
String WECOM_APPLY_SEND = "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=";
/**
* 微信公众号获取用户信息
*/
String WX_PUBLIC_ACCOUNT_GET_USER_INFO_URL_PREFIX = "https://api.weixin.qq.com/cgi-bin/user/info";
/**
* 微信公众号发送模版消息
*/
String WX_PUBLIC_ACCOUNT_TEMPLATE_SEND_URL_PREFIX = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=";
}
interface TRANSPORT {
String MQTT = "MQTT";
String TCP = "TCP";
String COAP = "COAP";
String UDP = "UDP";
String GB28181 = "GB28181";
}
}

View File

@@ -0,0 +1,117 @@
package com.maibu.constant;
/**
* 代码生成通用常量
*
* @author ruoyi
*/
public class GenConstants
{
/** 单表(增删改查) */
public static final String TPL_CRUD = "crud";
/** 树表(增删改查) */
public static final String TPL_TREE = "tree";
/** 主子表(增删改查) */
public static final String TPL_SUB = "sub";
/** 树编码字段 */
public static final String TREE_CODE = "treeCode";
/** 树父编码字段 */
public static final String TREE_PARENT_CODE = "treeParentCode";
/** 树名称字段 */
public static final String TREE_NAME = "treeName";
/** 上级菜单ID字段 */
public static final String PARENT_MENU_ID = "parentMenuId";
/** 上级菜单名称字段 */
public static final String PARENT_MENU_NAME = "parentMenuName";
/** 数据库字符串类型 */
public static final String[] COLUMNTYPE_STR = { "char", "varchar", "nvarchar", "varchar2" };
/** 数据库文本类型 */
public static final String[] COLUMNTYPE_TEXT = { "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",
"bit", "bigint", "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 HTML_IMAGE_UPLOAD = "imageUpload";
/** 文件上传控件 */
public static final String HTML_FILE_UPLOAD = "fileUpload";
/** 富文本控件 */
public static final String HTML_EDITOR = "editor";
/** 字符串类型 */
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 QUERY_EQ = "EQ";
/** 需要 */
public static final String REQUIRE = "1";
}

View File

@@ -0,0 +1,105 @@
package com.maibu.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 USER_NO_EXIST = 450;
/**
* 系统内部错误
*/
public static final int ERROR = 500;
/**
* 接口未实现
*/
public static final int NOT_IMPLEMENTED = 501;
/**
* 不弹窗显示
*/
public static final int NO_MESSAGE_ALERT = 502;
/**
* 系统警告消息
*/
public static final int WARN = 601;
}

View File

@@ -0,0 +1,19 @@
package com.maibu.constant;
public class IoTCommonDeviceConstant {
/**
* 定义下用到的topic 格式
*/
public static final String property_topic = "/iot/device/+/property";
/**
* 定义下用到的topic 格式
*/
public static final String event_topic = "/iot/device/+/event";
/**
* 定义下用到的topic 格式
*/
public static final String action_topic = "/iot/device/+/action";
}

View File

@@ -0,0 +1,21 @@
package com.maibu.constant;
/**
* 魔法值常量
*
* @author ruoyi
*/
public class MagicValueConstants
{
/**
* 3600
*/
public static final Integer VALUE_3600 = 3600;
/**
* 60
*/
public static final Integer VALUE_60 = 60;
}

View File

@@ -0,0 +1,41 @@
package com.maibu.constant;
/**
*
* @author fastb
* @date 2023-08-03 10:20
*/
public class ProductAuthConstant {
/**
* 产品设备认证方式-简单认证
*/
public static final Integer AUTH_WAY_SIMPLE = 1;
/**
* 产品设备认证方式-简单认证
*/
public static final Integer AUTH_WAY_ENCRYPT = 2;
/**
* 产品设备认证方式-简单认证
*/
public static final Integer AUTH_WAY_SIMPLE_AND_ENCRYPT = 3;
/**
* 产品设备客户端ID认证类型-简单认证
*/
public static final String CLIENT_ID_AUTH_TYPE_SIMPLE = "S";
/**
* 产品设备客户端ID认证类型-简单认证
*/
public static final String CLIENT_ID_AUTH_TYPE_ENCRYPT = "E";
/**
* 设备授权
*/
public static final Integer AUTHORIZE = 1;
/**
* 设备没有授权
*/
public static final Integer NO_AUTHORIZE = 1;
}

View File

@@ -0,0 +1,14 @@
package com.maibu.constant;
/**
* @author fastb
* @version 1.0
* @description: 组态常量类
* @date 2024-01-02 14:40
*/
public class ScadaConstant {
public static final String COMPONENT_TEMPLATE_DEFAULT = "<div id=\"app\" class=\"h2-text\">\n <h2>自定义组件案例</h2>\n <h4>支持element ui、样式自定义、vue的语法等</h4>\n <el-button type=\"primary\" @click=\"handleClick\">点击按钮</el-button>\n</div>";
public static final String COMPONENT_SCRIPT_DEFAULT = "export default {\n data() {\n return {}\n },\n created() {\n\n },\n mounted(){\n\n },\n methods:{\n handleClick(){\n this.$message('这是一条消息提示');\n }\n }\n}";
public static final String COMPONENT_STYLE_DEFAULT = "h2 {\n color:#409EFF\n}\n\nh4 {\n color:#F56C6C\n}";
}

View File

@@ -0,0 +1,47 @@
package com.maibu.constant;
/**
* @author fastb
* @version 1.0
* @description: 场景相关的场景
* @date 2024-06-04 15:26
*/
public class SceneModelConstants {
/**
* 时
*/
public static final String CYCLE_HOUR = "hour";
/**
* 日
*/
public static final String CYCLE_DAY = "day";
/**
* 周
*/
public static final String CYCLE_WEEK = "week";
/**
* 月
*/
public static final String CYCLE_MONTH = "month";
/**
* 当日
*/
public static final Integer CYCLE_TO_TYPE_NOW_DAY = 1;
/**
* 次日
*/
public static final Integer CYCLE_TO_TYPE_SECOND_DAY = 2;
/**
* 周
*/
public static final Integer CYCLE_TO_TYPE_WEEK = 3;
/**
* 月
*/
public static final Integer CYCLE_TO_TYPE_MONTH = 4;
}

View File

@@ -0,0 +1,50 @@
package com.maibu.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;
}
}
}

View File

@@ -0,0 +1,9 @@
package com.maibu.constant;
public class SipConstants {
public static final String MESSAGE_CATALOG = "Catalog";
public static final String MESSAGE_KEEP_ALIVE = "Keepalive";
public static final String MESSAGE_DEVICE_INFO = "DeviceInfo";
public static final String MESSAGE_RECORD_INFO = "RecordInfo";
public static final String MESSAGE_MEDIA_STATUS = "MediaStatus";
}

View File

@@ -0,0 +1,78 @@
package com.maibu.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";
/** ParentView组件标识 */
public final static String PARENT_VIEW = "ParentView";
/** InnerLink组件标识 */
public final static String INNER_LINK = "InnerLink";
/** 校验返回结果码 */
public final static String UNIQUE = "0";
public final static String NOT_UNIQUE = "1";
/**
* 用户名长度限制
*/
public static final int USERNAME_MIN_LENGTH = 2;
public static final int USERNAME_MAX_LENGTH = 20;
/**
* 密码长度限制
*/
public static final int PASSWORD_MIN_LENGTH = 5;
public static final int PASSWORD_MAX_LENGTH = 20;
}