电单车支付成功回调

This commit is contained in:
Guoqs
2024-09-12 13:51:43 +08:00
parent 1b97605bb4
commit 098355960f
5 changed files with 43 additions and 39 deletions

View File

@@ -50,6 +50,9 @@ public class PileRemoteService {
@Autowired
private RedisCache redisCache;
@Autowired
private EBikeSendCommandService eBikeSendCommandService;
@Value("${remoteUpdate.server}")
private String serverAddress;
@@ -108,6 +111,25 @@ public class PileRemoteService {
ykcPushCommandService.pushStartChargingCommand(startChargingCommand);
}
/**
* 电单车远程启动充电
*/
public void remoteStartChargingEBike(String pileSn, String connectorCode, String transactionCode, BigDecimal chargeAmount) {
if (StringUtils.isEmpty(pileSn) || StringUtils.isEmpty(connectorCode)) {
log.warn("远程启动充电, 充电桩编号和枪口号不能为空");
return;
}
log.info("【=====平台下发指令=====】: 电单车远程启动充电, 桩号:{}, 枪口号:{}", pileSn, connectorCode);
StartChargingCommand startChargingCommand = StartChargingCommand.builder()
.pileSn(pileSn)
.connectorCode(connectorCode)
.transactionCode(transactionCode)
.chargeAmount(chargeAmount)
.build();
// ykcPushCommandService.pushStartChargingCommand(startChargingCommand);
eBikeSendCommandService.sendStartChargingCommand(startChargingCommand);
}
/**
* 远程停止充电
*/