Files
jsowell-charger-web/jsowell-common/src/main/java/com/jsowell/common/constant/Constants.java

238 lines
5.1 KiB
Java
Raw Normal View History

2023-03-04 16:29:55 +08:00
package com.jsowell.common.constant;
import io.jsonwebtoken.Claims;
/**
* 通用常量信息
*
* @author jsowell
*/
public class Constants {
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号长度
public static final int PILE_SN_LENGTH = 14;
// 充电桩枪口号长度
public static final int CONNECTOR_CODE_LENGTH = 2;
// 充电桩枪口编号长度
public static final int PILE_CONNECTOR_CODE_LENGTH = PILE_SN_LENGTH + CONNECTOR_CODE_LENGTH;
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-03-04 16:29:55 +08:00
public static final byte[] updateServerPort = new byte[]{port};
2023-04-06 16:01:10 +08:00
public static final String updateServerUserName = "ftptest";
2023-03-04 16:29:55 +08:00
2023-04-06 16:01:10 +08:00
public static final String updateServerPassword = "js160829";
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
2023-05-10 08:49:01 +08:00
public static final String OPERATORID_LIANLIAN = "MA1JLFUU8";
2023-03-04 16:29:55 +08:00
// public static final String APP_ID = "wxbb3e0d474569481d"; // 举视充电网 wxbb3e0d474569481d
//
// public static final String APP_SECRET = "bbac689f4654b209de4d6944808ec80b"; // 举视充电网 bbac689f4654b209de4d6944808ec80b
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 int zero = 0;
public static final int one = 1;
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";
/**
* 删除标识 0标识正常
*/
public static final String DEL_FLAG_NORMAL = "0";
/**
* 删除标识 1标识被删除
*/
public static final String DEL_FLAG_DELETE = "1";
/**
* 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 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";
2023-03-04 16:29:55 +08:00
}