update 交易流水号

This commit is contained in:
2023-03-13 15:51:41 +08:00
parent 27608923cb
commit 9a0692a0f6
4 changed files with 8 additions and 6 deletions

View File

@@ -317,7 +317,7 @@ public class OrderService {
StartChargingCommand startChargingCommand = StartChargingCommand.builder() StartChargingCommand startChargingCommand = StartChargingCommand.builder()
.pileSn(pileSn) .pileSn(pileSn)
.connectorCode(orderInfo.getConnectorCode()) .connectorCode(orderInfo.getConnectorCode())
.orderCode(dto.getOrderCode()) .transactionCode(orderInfo.getTransactionCode())
.chargeAmount(payAmount) .chargeAmount(payAmount)
.build(); .build();
ykcPushCommandService.pushStartChargingCommand(startChargingCommand); ykcPushCommandService.pushStartChargingCommand(startChargingCommand);

View File

@@ -18,7 +18,7 @@ public class StartChargingCommand {
/** /**
* 交易流水号 * 交易流水号
*/ */
private String orderCode; private String transactionCode;
/** /**
* 充电桩编号 * 充电桩编号

View File

@@ -138,12 +138,12 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
public void pushStartChargingCommand(StartChargingCommand command) { public void pushStartChargingCommand(StartChargingCommand command) {
String pileSn = command.getPileSn(); String pileSn = command.getPileSn();
String connectorCode = command.getConnectorCode(); String connectorCode = command.getConnectorCode();
String orderCode = command.getOrderCode(); String transactionCode = command.getTransactionCode();
if (StringUtils.isEmpty(pileSn) || StringUtils.isEmpty(connectorCode) ) { if (StringUtils.isEmpty(pileSn) || StringUtils.isEmpty(connectorCode) ) {
log.warn("远程启动充电, 充电桩编号和枪口号不能为空"); log.warn("远程启动充电, 充电桩编号和枪口号不能为空");
return; return;
} }
if (StringUtils.isEmpty(orderCode)) { if (StringUtils.isEmpty(transactionCode)) {
log.warn("远程启动充电, 交易流水号不能为空"); log.warn("远程启动充电, 交易流水号不能为空");
return; return;
} }
@@ -156,7 +156,7 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
byte[] connectorCodeByteArr = BytesUtil.str2Bcd(connectorCode); byte[] connectorCodeByteArr = BytesUtil.str2Bcd(connectorCode);
// 交易流水号 // 交易流水号
byte[] orderIdByteArr = BytesUtil.str2Bcd(orderCode); byte[] orderIdByteArr = BytesUtil.str2Bcd(transactionCode);
// 桩编号 // 桩编号
byte[] pileSnByteArr = BytesUtil.str2Bcd(pileSn); byte[] pileSnByteArr = BytesUtil.str2Bcd(pileSn);
@@ -180,7 +180,7 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
byte[] msgBody = Bytes.concat(orderIdByteArr, pileSnByteArr, connectorCodeByteArr, logicCardNumByteArr, physicsCardNumByteArr, accountBalanceByteArr); byte[] msgBody = Bytes.concat(orderIdByteArr, pileSnByteArr, connectorCodeByteArr, logicCardNumByteArr, physicsCardNumByteArr, accountBalanceByteArr);
this.push(msgBody, pileSn, YKCFrameTypeCode.REMOTE_CONTROL_START_CODE); this.push(msgBody, pileSn, YKCFrameTypeCode.REMOTE_CONTROL_START_CODE);
log.info("【=====平台下发充电指令=====】:订单id:{}, 桩号:{}, 枪口号:{}, 逻辑卡号:{}, 物理卡号:{}, 账户余额:{}", log.info("【=====平台下发充电指令=====】:订单id:{}, 桩号:{}, 枪口号:{}, 逻辑卡号:{}, 物理卡号:{}, 账户余额:{}",
orderCode, pileSn, BytesUtil.bcd2Str(connectorCodeByteArr), logicCardNum, physicsCardNum, chargeAmount); transactionCode, pileSn, BytesUtil.bcd2Str(connectorCodeByteArr), logicCardNum, physicsCardNum, chargeAmount);
} }
@Override @Override

View File

@@ -6,6 +6,7 @@
<resultMap type="com.jsowell.pile.domain.OrderBasicInfo" id="OrderBasicInfoResult"> <resultMap type="com.jsowell.pile.domain.OrderBasicInfo" id="OrderBasicInfoResult">
<result property="id" column="id"/> <result property="id" column="id"/>
<result property="orderCode" column="order_code"/> <result property="orderCode" column="order_code"/>
<result property="transactionCode" column="transaction_code"/>
<result property="orderStatus" column="order_status"/> <result property="orderStatus" column="order_status"/>
<result property="memberId" column="member_id"/> <result property="memberId" column="member_id"/>
<result property="stationId" column="station_id"/> <result property="stationId" column="station_id"/>
@@ -80,6 +81,7 @@
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, id,
order_code, order_code,
transaction_code,
order_status, order_status,
member_id, member_id,
station_id, station_id,