2023-03-04 16:29:55 +08:00
|
|
|
|
package com.jsowell.common.constant;
|
|
|
|
|
|
|
|
|
|
|
|
import io.jsonwebtoken.Claims;
|
|
|
|
|
|
|
2024-01-11 16:14:35 +08:00
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
|
|
2023-03-04 16:29:55 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 通用常量信息
|
|
|
|
|
|
*
|
|
|
|
|
|
* @author jsowell
|
|
|
|
|
|
*/
|
|
|
|
|
|
public class Constants {
|
2023-08-04 13:55:36 +08:00
|
|
|
|
|
2024-02-20 16:05:54 +08:00
|
|
|
|
// 十六进制前缀
|
|
|
|
|
|
public static final String HEX_PREFIX = "0x";
|
|
|
|
|
|
|
2024-01-11 16:14:35 +08:00
|
|
|
|
// 白名单默认金额
|
2024-05-09 10:15:44 +08:00
|
|
|
|
public static final BigDecimal WHITELIST_DEFAULT_AMOUNT = new BigDecimal(Constants.FIVE_HUNDRED);
|
2024-01-11 16:14:35 +08:00
|
|
|
|
|
|
|
|
|
|
// 余额支付默认最大金额
|
2024-05-09 10:15:44 +08:00
|
|
|
|
public static final BigDecimal BALANCE_PAY_MAX_AMOUNT = new BigDecimal(Constants.TWO_HUNDRED);
|
|
|
|
|
|
|
2024-07-18 08:12:30 +08:00
|
|
|
|
public static final BigDecimal BALANCE_PAY_MAX_AMOUNT_NEW = new BigDecimal(Constants.FIVE_HUNDRED);
|
|
|
|
|
|
|
2024-05-09 10:15:44 +08:00
|
|
|
|
// 联联平台最大启动金额
|
|
|
|
|
|
public static final BigDecimal LIAN_LIAN_MAX_AMOUNT = new BigDecimal(Constants.THREE_HUNDRED_FIFTY);
|
2024-01-11 16:14:35 +08:00
|
|
|
|
|
2023-08-04 13:55:36 +08:00
|
|
|
|
// 默认分隔符
|
|
|
|
|
|
public static final String DEFAULT_DELIMITER = ",";
|
|
|
|
|
|
|
2023-05-24 14:19:36 +08:00
|
|
|
|
// 非法交易流水号 由充电桩启动的订单会传全是0的交易流水号
|
|
|
|
|
|
public static final String ILLEGAL_TRANSACTION_CODE = "00000000000000000000000000000000";
|
|
|
|
|
|
|
2023-03-04 16:29:55 +08:00
|
|
|
|
// 充电桩sn号长度
|
2024-09-03 09:36:27 +08:00
|
|
|
|
public static final int PILE_SN_LENGTH_FOR_EV = 14;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
|
|
|
|
|
// 充电桩枪口号长度
|
2024-09-03 09:36:27 +08:00
|
|
|
|
public static final int CONNECTOR_CODE_LENGTH_FOR_EV = 2;
|
|
|
|
|
|
|
|
|
|
|
|
// 充电桩枪口编号长度
|
|
|
|
|
|
public static final int PILE_CONNECTOR_CODE_LENGTH = PILE_SN_LENGTH_FOR_EV + CONNECTOR_CODE_LENGTH_FOR_EV;
|
|
|
|
|
|
|
|
|
|
|
|
// 充电桩sn号长度
|
|
|
|
|
|
public static final int PILE_SN_LENGTH_FOR_EBIKE = 14;
|
|
|
|
|
|
|
|
|
|
|
|
// 充电桩枪口号长度
|
|
|
|
|
|
public static final int CONNECTOR_CODE_LENGTH_FOR_EBIKE = 2;
|
|
|
|
|
|
|
|
|
|
|
|
// 充电桩枪口编号长度
|
|
|
|
|
|
public static final int PILE_CONNECTOR_CODE_LENGTH_FOR_EBIKE = PILE_SN_LENGTH_FOR_EBIKE + CONNECTOR_CODE_LENGTH_FOR_EBIKE;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-07-27 15:44:41 +08:00
|
|
|
|
// 汇付手续费费率
|
|
|
|
|
|
public static final String FEE_RATES = "0.0055";
|
|
|
|
|
|
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
|
|
|
|
|
public static final String SOCKET_IP = "127.0.0.1";
|
2023-05-24 14:19:36 +08:00
|
|
|
|
|
|
|
|
|
|
// 默认端口号
|
2023-03-04 16:29:55 +08:00
|
|
|
|
public static final Integer SOCKET_PORT = 9011;
|
|
|
|
|
|
|
2023-05-24 14:19:36 +08:00
|
|
|
|
// 阿里云服务器地址
|
2023-04-06 16:01:10 +08:00
|
|
|
|
public static final String updateServerIP = "47.103.124.69";
|
2023-05-24 14:19:36 +08:00
|
|
|
|
|
|
|
|
|
|
// ftp端口号
|
2023-04-07 08:57:53 +08:00
|
|
|
|
public static final int port = 0x15;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-06-26 14:23:21 +08:00
|
|
|
|
public static final String JSOWELL = "举视";
|
|
|
|
|
|
|
2023-10-26 16:54:50 +08:00
|
|
|
|
public static final String DEFAULT = "default"; // 默认
|
|
|
|
|
|
|
2024-06-27 11:14:41 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 定时任务需要appId, 取默认万车充的appId
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String DEFAULT_APP_ID = "wxbb3e0d474569481d"; // 默认微信小程序appId
|
|
|
|
|
|
|
2023-03-04 16:29:55 +08:00
|
|
|
|
public static final byte[] updateServerPort = new byte[]{port};
|
|
|
|
|
|
|
2024-05-10 09:44:52 +08:00
|
|
|
|
// FTP用户名
|
2023-04-06 16:01:10 +08:00
|
|
|
|
public static final String updateServerUserName = "ftptest";
|
2024-05-17 17:21:44 +08:00
|
|
|
|
public static final String updateServerUserName2 = "jsowellftp";
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2024-05-10 09:44:52 +08:00
|
|
|
|
// FTP密码
|
|
|
|
|
|
public static final String updateServerPassword = "aEYU^q=8t";
|
2024-05-17 17:21:44 +08:00
|
|
|
|
public static final String updateServerPassword2 = "ZzJeZRB6fDRcnfkz";
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
2023-04-06 16:01:10 +08:00
|
|
|
|
public static final String filePath = "/update.bin";
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
|
|
|
|
|
public static final String partnerId = "1632405339"; // 商户号Id
|
|
|
|
|
|
|
2024-04-28 16:26:29 +08:00
|
|
|
|
// 对接第三方平台,我方OPERATORID
|
|
|
|
|
|
public static final String JSOWELL_OPERATORID = "MA1JLFUU8";
|
|
|
|
|
|
|
2023-05-10 08:49:01 +08:00
|
|
|
|
public static final String OPERATORID_LIANLIAN = "MA1JLFUU8";
|
2023-10-20 17:20:31 +08:00
|
|
|
|
public static final String OPERATORID_JIANG_SU = "MA1X78KH5";
|
|
|
|
|
|
|
2024-05-10 09:44:52 +08:00
|
|
|
|
|
2023-11-16 08:46:36 +08:00
|
|
|
|
public static final String OPERATORID_XI_XIAO = "MAC13L2Q9";
|
|
|
|
|
|
|
2023-12-06 11:22:22 +08:00
|
|
|
|
public static final String OPERATORID_YUAN_DA = "599777560";
|
|
|
|
|
|
|
2023-03-04 16:29:55 +08:00
|
|
|
|
// public static final String APP_ID = "wxbb3e0d474569481d"; // 举视充电网 wxbb3e0d474569481d
|
|
|
|
|
|
//
|
|
|
|
|
|
// public static final String APP_SECRET = "bbac689f4654b209de4d6944808ec80b"; // 举视充电网 bbac689f4654b209de4d6944808ec80b
|
|
|
|
|
|
|
2024-08-29 17:08:11 +08:00
|
|
|
|
public static final String SYSTEM = "system";
|
|
|
|
|
|
|
2023-03-04 16:29:55 +08:00
|
|
|
|
public static final String ZERO = "0";
|
|
|
|
|
|
|
|
|
|
|
|
public static final String ONE = "1";
|
|
|
|
|
|
|
|
|
|
|
|
public static final String TWO = "2";
|
|
|
|
|
|
|
|
|
|
|
|
public static final String THREE = "3";
|
|
|
|
|
|
|
2024-01-11 16:14:35 +08:00
|
|
|
|
public static final String TWO_HUNDRED = "200";
|
|
|
|
|
|
|
2024-05-09 10:15:44 +08:00
|
|
|
|
public static final String THREE_HUNDRED_FIFTY = "350";
|
|
|
|
|
|
|
2024-01-11 16:14:35 +08:00
|
|
|
|
public static final String FIVE_HUNDRED = "500";
|
|
|
|
|
|
|
2023-03-04 16:29:55 +08:00
|
|
|
|
public static final int zero = 0;
|
|
|
|
|
|
|
|
|
|
|
|
public static final int one = 1;
|
|
|
|
|
|
|
2024-01-26 16:39:46 +08:00
|
|
|
|
public static final int two = 2;
|
|
|
|
|
|
|
2023-08-01 10:08:32 +08:00
|
|
|
|
public static final int four = 4;
|
|
|
|
|
|
|
2023-03-04 16:29:55 +08:00
|
|
|
|
public static final byte zeroByte = 0x00;
|
|
|
|
|
|
|
|
|
|
|
|
public static final byte[] zeroByteArray = new byte[]{zeroByte};
|
|
|
|
|
|
|
|
|
|
|
|
public static final byte oneByte = 0x01;
|
|
|
|
|
|
|
|
|
|
|
|
public static final byte[] oneByteArray = new byte[]{oneByte};
|
|
|
|
|
|
|
|
|
|
|
|
public static final byte twoByte = 0x02;
|
|
|
|
|
|
|
|
|
|
|
|
public static final byte[] twoByteArray = new byte[]{twoByte};
|
|
|
|
|
|
|
|
|
|
|
|
public static final String FAULT_CODE = "255";
|
|
|
|
|
|
|
|
|
|
|
|
public static final String DOUBLE_ZERO = "00";
|
|
|
|
|
|
|
|
|
|
|
|
public static final String ZERO_ONE = "01";
|
|
|
|
|
|
|
|
|
|
|
|
public static final String ZERO_THREE = "03";
|
|
|
|
|
|
|
2024-06-07 11:33:26 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* RSA2签名算法
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String RSA2 = "RSA2";
|
|
|
|
|
|
|
2023-03-04 16:29:55 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* UTF-8 字符集
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String UTF8 = "UTF-8";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* GBK 字符集
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String GBK = "GBK";
|
|
|
|
|
|
|
2024-06-07 11:33:26 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* URL分隔符
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String URL_DELIMITER = "://";
|
|
|
|
|
|
|
|
|
|
|
|
public static final String HTTP = "http";
|
|
|
|
|
|
|
|
|
|
|
|
public static final String HTTPS = "https";
|
|
|
|
|
|
|
2023-03-04 16:29:55 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* http请求
|
|
|
|
|
|
*/
|
2024-06-07 11:33:26 +08:00
|
|
|
|
public static final String HTTP_PREFIX = HTTP + URL_DELIMITER;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* https请求
|
|
|
|
|
|
*/
|
2024-06-07 11:33:26 +08:00
|
|
|
|
public static final String HTTPS_PREFIX = HTTPS + URL_DELIMITER;
|
2023-03-04 16:29:55 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 通用成功标识
|
|
|
|
|
|
*/
|
|
|
|
|
|
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 VERIFICATION_CODE_EXPIRATION_TIME = 10;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 验证码有效期(分钟)
|
|
|
|
|
|
*/
|
|
|
|
|
|
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.jsowell"};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 定时任务违规的字符
|
|
|
|
|
|
*/
|
|
|
|
|
|
public static final String[] JOB_ERROR_STR = {"java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
|
|
|
|
|
|
"org.springframework", "org.apache", "com.jsowell.common.util.file"};
|
2023-06-09 14:44:32 +08:00
|
|
|
|
|
|
|
|
|
|
// Y-是
|
|
|
|
|
|
public static final String Y = "Y";
|
|
|
|
|
|
|
|
|
|
|
|
// N-否
|
|
|
|
|
|
public static final String N = "N";
|
2023-06-29 16:16:25 +08:00
|
|
|
|
|
|
|
|
|
|
// 汇付个人用户前缀
|
|
|
|
|
|
public static final String ADAPAY_MEMBER_PREFIX = "AM";
|
|
|
|
|
|
|
|
|
|
|
|
// 汇付企业用户前缀
|
|
|
|
|
|
public static final String ADAPAY_CORP_MEMBER_PREFIX = "ACM";
|
2023-07-10 15:08:36 +08:00
|
|
|
|
|
|
|
|
|
|
// 汇付延时分账支付模式
|
|
|
|
|
|
public static final String ADAPAY_PAY_MODE_DELAY = "delay";
|
2024-01-11 16:14:35 +08:00
|
|
|
|
|
2023-03-04 16:29:55 +08:00
|
|
|
|
}
|