diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/service/impl/TransactionBillServiceImpl.java b/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/service/impl/TransactionBillServiceImpl.java index c9647833..47fbc77d 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/service/impl/TransactionBillServiceImpl.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/service/impl/TransactionBillServiceImpl.java @@ -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; });