mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-21 07:39:55 +08:00
update 电池报告算法逻辑
This commit is contained in:
@@ -423,10 +423,10 @@ public class PaymentTestController {
|
|||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void createPaymentReverseRequestTest() {
|
public void createPaymentReverseRequestTest() {
|
||||||
String paymentId = "002212025010720373310722683516795273216";
|
String paymentId = "002212025112213314210838178078469394432";
|
||||||
BigDecimal refundAmount = new BigDecimal("1.08");
|
BigDecimal refundAmount = new BigDecimal("49.5");
|
||||||
String memberId = "48781184";
|
String memberId = "67717378";
|
||||||
String orderCode = "C67335843091";
|
String orderCode = "C088649732085";
|
||||||
|
|
||||||
// 延迟分账未确认调撤销调撤销接口退款
|
// 延迟分账未确认调撤销调撤销接口退款
|
||||||
PaymentReverseOperation operation = new PaymentReverseOperation();
|
PaymentReverseOperation operation = new PaymentReverseOperation();
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ public class BatteryChargeReportService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private PileStationInfoService pileStationInfoService;
|
private PileStationInfoService pileStationInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
private ChargeAlgorithmRecordService chargeAlgorithmRecordService;
|
private ChargeAlgorithmRecordService chargeAlgorithmRecordService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -100,12 +101,16 @@ public class BatteryChargeReportService {
|
|||||||
log.error("订单:{} 获取到 taskId 为空", orderCode);
|
log.error("订单:{} 获取到 taskId 为空", orderCode);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// 存入数据库
|
ChargeAlgorithmRecord record = chargeAlgorithmRecordService.queryRecordByOrderCode(orderCode);
|
||||||
ChargeAlgorithmRecord record = new ChargeAlgorithmRecord();
|
if (record != null) {
|
||||||
record.setOrderCode(orderCode);
|
|
||||||
record.setTaskId(taskId);
|
record.setTaskId(taskId);
|
||||||
|
chargeAlgorithmRecordService.updateChargeAlgorithmRecord(record);
|
||||||
|
}else {
|
||||||
|
record = new ChargeAlgorithmRecord();
|
||||||
|
record.setTaskId(taskId);
|
||||||
|
record.setOrderCode(orderCode);
|
||||||
chargeAlgorithmRecordService.insertOrUpdateSelective(record);
|
chargeAlgorithmRecordService.insertOrUpdateSelective(record);
|
||||||
|
}
|
||||||
return taskId;
|
return taskId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user