debug:归零时,修改订单状态失败

This commit is contained in:
墨大叔 2024-09-18 09:07:30 +08:00
parent 957ab5abd8
commit a18692a66b

View File

@ -974,14 +974,14 @@ public class TransactionBillServiceImpl implements TransactionBillService, After
data.setSuitEndEle(totalEle);
TransactionBillQuery query = new TransactionBillQuery();
query.setBillId(order.getBillId());
query.setStatus(TransactionBillStatus.SUCCESS.getStatus());
if (SuitFeeType.TIME.getType().equals(order.getSuitFeeType())) {
query.setStartSuitEndTime(endTime); // 计时的话需要结束时间在这之后的订单
} else if (SuitFeeType.COUNT.getType().equals(order.getSuitFeeType())) {
query.setStartSuitEndEle(totalEle); // 计量的话需要结束电量比这个大的订单
}
int update = this.updateByQuery(data, query);
ServiceUtil.assertion(update != 1, "修改订单信息失败");
ServiceUtil.assertion(update != 1, "修改订单信息失败,请重试:" + order.getBillNo());
// 若金额 > 0.01 则申请退款
if (BigDecimal.valueOf(0.01).compareTo(refundAmount) < 0) {
@ -1070,13 +1070,14 @@ public class TransactionBillServiceImpl implements TransactionBillService, After
data.setSuitEndEle(totalEle);
TransactionBillQuery query = new TransactionBillQuery();
query.setBillId(order.getBillId());
query.setStatus(TransactionBillStatus.SUCCESS.getStatus());
if (SuitFeeType.TIME.getType().equals(order.getSuitFeeType())) {
query.setStartSuitEndTime(endTime); // 计时的话需要结束时间在这之后的订单
} else if (SuitFeeType.COUNT.getType().equals(order.getSuitFeeType())) {
query.setStartSuitEndEle(totalEle); // 计量的话需要结束电量比这个大的订单
}
int update = this.updateByQuery(data, query);
ServiceUtil.assertion(update != 1, "修改订单信息失败");
ServiceUtil.assertion(update != 1, "修改订单信息失败,请重试:" + order.getBillNo());
return update;
});