mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-23 16:49:49 +08:00
update 非法的交易流水号
This commit is contained in:
@@ -8,6 +8,9 @@ import io.jsonwebtoken.Claims;
|
|||||||
* @author jsowell
|
* @author jsowell
|
||||||
*/
|
*/
|
||||||
public class Constants {
|
public class Constants {
|
||||||
|
// 非法交易流水号 由充电桩启动的订单会传全是0的交易流水号
|
||||||
|
public static final String ILLEGAL_TRANSACTION_CODE = "00000000000000000000000000000000";
|
||||||
|
|
||||||
// 充电桩sn号长度
|
// 充电桩sn号长度
|
||||||
public static final int PILE_SN_LENGTH = 14;
|
public static final int PILE_SN_LENGTH = 14;
|
||||||
|
|
||||||
@@ -18,9 +21,14 @@ public class Constants {
|
|||||||
public static final int PILE_CONNECTOR_CODE_LENGTH = PILE_SN_LENGTH + CONNECTOR_CODE_LENGTH;
|
public static final int PILE_CONNECTOR_CODE_LENGTH = PILE_SN_LENGTH + CONNECTOR_CODE_LENGTH;
|
||||||
|
|
||||||
public static final String SOCKET_IP = "127.0.0.1";
|
public static final String SOCKET_IP = "127.0.0.1";
|
||||||
|
|
||||||
|
// 默认端口号
|
||||||
public static final Integer SOCKET_PORT = 9011;
|
public static final Integer SOCKET_PORT = 9011;
|
||||||
|
|
||||||
|
// 阿里云服务器地址
|
||||||
public static final String updateServerIP = "47.103.124.69";
|
public static final String updateServerIP = "47.103.124.69";
|
||||||
|
|
||||||
|
// ftp端口号
|
||||||
public static final int port = 0x15;
|
public static final int port = 0x15;
|
||||||
|
|
||||||
public static final byte[] updateServerPort = new byte[]{port};
|
public static final byte[] updateServerPort = new byte[]{port};
|
||||||
|
|||||||
@@ -445,7 +445,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
|||||||
@Override
|
@Override
|
||||||
public OrderBasicInfo getOrderInfoByOrderCode(String orderCode) {
|
public OrderBasicInfo getOrderInfoByOrderCode(String orderCode) {
|
||||||
// 如果orderCode是00000000000000000000000000000000,直接返回null
|
// 如果orderCode是00000000000000000000000000000000,直接返回null
|
||||||
if (StringUtils.equals("00000000000000000000000000000000", orderCode)) {
|
if (StringUtils.equals(Constants.ILLEGAL_TRANSACTION_CODE, orderCode)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String redisKey = CacheConstants.GET_ORDER_INFO_BY_ORDER_CODE + orderCode;
|
String redisKey = CacheConstants.GET_ORDER_INFO_BY_ORDER_CODE + orderCode;
|
||||||
@@ -464,7 +464,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public OrderBasicInfo getOrderInfoByTransactionCode(String transactionCode) {
|
public OrderBasicInfo getOrderInfoByTransactionCode(String transactionCode) {
|
||||||
if (StringUtils.equals("00000000000000000000000000000000", transactionCode)) {
|
if (StringUtils.equals(Constants.ILLEGAL_TRANSACTION_CODE, transactionCode)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String redisKey = CacheConstants.GET_ORDER_INFO_BY_TRANSACTION_CODE + transactionCode;
|
String redisKey = CacheConstants.GET_ORDER_INFO_BY_TRANSACTION_CODE + transactionCode;
|
||||||
@@ -731,7 +731,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从redis中取出实时记录保存到表中
|
* 从redis中取出实时记录保存到表中j
|
||||||
* 当订单完成的时候调用
|
* 当订单完成的时候调用
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -470,6 +470,9 @@ public class PileBasicInfoServiceImpl implements IPileBasicInfoService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void saveRealTimeMonitorData2Redis(RealTimeMonitorData realTimeMonitorData) {
|
public void saveRealTimeMonitorData2Redis(RealTimeMonitorData realTimeMonitorData) {
|
||||||
|
if (StringUtils.equals(realTimeMonitorData.getTransactionCode(), Constants.ILLEGAL_TRANSACTION_CODE)) {
|
||||||
|
|
||||||
|
}
|
||||||
// 保存到redis
|
// 保存到redis
|
||||||
String redisKey = CacheConstants.PILE_REAL_TIME_MONITOR_DATA + realTimeMonitorData.getPileConnectorCode() + "_" + realTimeMonitorData.getTransactionCode();
|
String redisKey = CacheConstants.PILE_REAL_TIME_MONITOR_DATA + realTimeMonitorData.getPileConnectorCode() + "_" + realTimeMonitorData.getTransactionCode();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user