mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
328 lines
8.1 KiB
Java
328 lines
8.1 KiB
Java
package com.jsowell.common.constant;
|
||
|
||
import io.jsonwebtoken.Claims;
|
||
|
||
import java.math.BigDecimal;
|
||
|
||
/**
|
||
* 通用常量信息
|
||
*
|
||
* @author jsowell
|
||
*/
|
||
public class Constants {
|
||
// 电单车协议包头
|
||
public static final String EBIKE_HEADER = "DNY";
|
||
|
||
// 十六进制前缀
|
||
public static final String HEX_PREFIX = "0x";
|
||
|
||
// 白名单默认金额
|
||
public static final BigDecimal WHITELIST_DEFAULT_AMOUNT = new BigDecimal(Constants.FIVE_HUNDRED);
|
||
|
||
// 余额支付默认最大金额
|
||
public static final BigDecimal BALANCE_PAY_MAX_AMOUNT = new BigDecimal(Constants.TWO_HUNDRED);
|
||
|
||
public static final BigDecimal BALANCE_PAY_MAX_AMOUNT_NEW = new BigDecimal(Constants.FIVE_HUNDRED);
|
||
|
||
// 联联平台最大启动金额
|
||
public static final BigDecimal LIAN_LIAN_MAX_AMOUNT = new BigDecimal(Constants.THREE_HUNDRED_FIFTY);
|
||
|
||
// 默认分隔符
|
||
public static final String DEFAULT_DELIMITER = ",";
|
||
|
||
// 非法交易流水号 由充电桩启动的订单会传全是0的交易流水号
|
||
public static final String ILLEGAL_TRANSACTION_CODE = "00000000000000000000000000000000";
|
||
|
||
// 电动汽车充电桩sn号长度
|
||
public static final int PILE_SN_LENGTH_FOR_EV = 14;
|
||
|
||
// 电动汽车充电桩枪口号长度
|
||
public static final int CONNECTOR_CODE_LENGTH_FOR_EV = 2;
|
||
|
||
// 电动汽车充电桩枪口编号长度
|
||
public static final int PILE_CONNECTOR_CODE_LENGTH_FOR_EV = PILE_SN_LENGTH_FOR_EV + CONNECTOR_CODE_LENGTH_FOR_EV;
|
||
|
||
// 电单车充电桩sn号长度
|
||
public static final int PILE_SN_LENGTH_FOR_EBIKE = 8;
|
||
|
||
// 电单车充电桩枪口号长度
|
||
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;
|
||
|
||
// 汇付手续费费率
|
||
public static final String FEE_RATES = "0.0060";
|
||
|
||
|
||
public static final String SOCKET_IP = "127.0.0.1";
|
||
|
||
// 默认端口号
|
||
public static final Integer SOCKET_PORT = 9011;
|
||
|
||
// 阿里云服务器地址
|
||
public static final String updateServerIP = "47.103.124.69";
|
||
|
||
// ftp端口号
|
||
public static final int port = 0x15;
|
||
|
||
public static final String JSOWELL = "举视";
|
||
|
||
// 希晓运营商的merchantId
|
||
public static final String XIXIAO_MERCHANT_ID_PRD = "35";
|
||
|
||
public static final String DEFAULT = "default"; // 默认
|
||
|
||
/**
|
||
* 定时任务需要appId, 取默认万车充的appId
|
||
*/
|
||
public static final String DEFAULT_APP_ID = "wxbb3e0d474569481d"; // 默认微信小程序appId
|
||
|
||
public static final String XIXIAO_APP_ID = "wx20abc5210391649c"; // 希晓微信小程序appId
|
||
|
||
public static final byte[] updateServerPort = new byte[]{port};
|
||
|
||
// FTP用户名
|
||
public static final String updateServerUserName = "ftptest";
|
||
public static final String updateServerUserName2 = "jsowellftp";
|
||
|
||
// FTP密码
|
||
public static final String updateServerPassword = "aEYU^q=8t";
|
||
public static final String updateServerPassword2 = "ZzJeZRB6fDRcnfkz";
|
||
|
||
public static final String filePath = "/update.bin";
|
||
|
||
public static final String partnerId = "1632405339"; // 商户号Id
|
||
|
||
// 对接第三方平台,我方OPERATORID
|
||
public static final String JSOWELL_OPERATORID = "MA1JLFUU8";
|
||
public static final String JSOWELL_OPERATORUSCID = "91310118MA1JLFUU81";
|
||
|
||
public static final String OPERATORID_LIANLIAN = "MA1JLFUU8";
|
||
public static final String OPERATORID_JIANG_SU = "MA1X78KH5";
|
||
// public static final String OPERATORID_GUI_ZHOU = "MAC9K4RRX";
|
||
|
||
public static final String MANUFACTURER_NAME = "举视(江苏)新能源设备制造有限公司";
|
||
//设备所属公司
|
||
public static final String Equipment_Owner_Name = "举视(上海)新能源科技有限公司";
|
||
|
||
|
||
public static final String OPERATORID_XI_XIAO = "MAC13L2Q9";
|
||
|
||
public static final String OPERATORID_ZHI_HE = "057643496";
|
||
|
||
public static final String OPERATORID_YUAN_DA = "599777560";
|
||
|
||
// public static final String APP_ID = "wxbb3e0d474569481d"; // 举视充电网 wxbb3e0d474569481d
|
||
//
|
||
// public static final String APP_SECRET = "bbac689f4654b209de4d6944808ec80b"; // 举视充电网 bbac689f4654b209de4d6944808ec80b
|
||
|
||
public static final String SYSTEM = "system";
|
||
|
||
public static final String ZERO = "0";
|
||
|
||
public static final String ONE = "1";
|
||
|
||
public static final String TWO = "2";
|
||
|
||
public static final String THREE = "3";
|
||
|
||
public static final String TWO_HUNDRED = "200";
|
||
|
||
public static final String THREE_HUNDRED_FIFTY = "350";
|
||
|
||
public static final String FIVE_HUNDRED = "500";
|
||
|
||
public static final int zero = 0;
|
||
|
||
public static final int one = 1;
|
||
|
||
public static final int two = 2;
|
||
|
||
public static final int four = 4;
|
||
|
||
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";
|
||
|
||
/**
|
||
* RSA2签名算法
|
||
*/
|
||
public static final String RSA2 = "RSA2";
|
||
|
||
/**
|
||
* UTF-8 字符集
|
||
*/
|
||
public static final String UTF8 = "UTF-8";
|
||
|
||
/**
|
||
* GBK 字符集
|
||
*/
|
||
public static final String GBK = "GBK";
|
||
|
||
/**
|
||
* URL分隔符
|
||
*/
|
||
public static final String URL_DELIMITER = "://";
|
||
|
||
public static final String HTTP = "http";
|
||
|
||
public static final String HTTPS = "https";
|
||
|
||
/**
|
||
* http请求
|
||
*/
|
||
public static final String HTTP_PREFIX = HTTP + URL_DELIMITER;
|
||
|
||
/**
|
||
* https请求
|
||
*/
|
||
public static final String HTTPS_PREFIX = HTTPS + URL_DELIMITER;
|
||
|
||
/**
|
||
* 通用成功标识
|
||
*/
|
||
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"};
|
||
|
||
// Y-是
|
||
public static final String Y = "Y";
|
||
|
||
// N-否
|
||
public static final String N = "N";
|
||
|
||
// 汇付个人用户前缀
|
||
public static final String ADAPAY_MEMBER_PREFIX = "AM";
|
||
|
||
// 汇付企业用户前缀
|
||
public static final String ADAPAY_CORP_MEMBER_PREFIX = "ACM";
|
||
|
||
// 汇付延时分账支付模式
|
||
public static final String ADAPAY_PAY_MODE_DELAY = "delay";
|
||
|
||
// 通用验证码
|
||
public static final String COMMON_VERIFICATION_CODE = "8888";
|
||
|
||
}
|