|
@@ -140,14 +140,18 @@ public class UserOrderRefundServiceImpl extends ServiceImpl<UserOrderRefundDao,
|
|
|
HttpResponseResult<RefundCreateRes> apply = refundCreateFunction.apply(refundReq);
|
|
|
if (apply.getStatus()) {
|
|
|
detilIds.add(vo.getId());
|
|
|
- actualPrice.add(apply.getData().getActualPrice());
|
|
|
+ actualPrice = actualPrice.add(apply.getData().getActualPrice());
|
|
|
}
|
|
|
} else {
|
|
|
detilIds.add(vo.getId());
|
|
|
- actualPrice.add(vo.getActualPrice());
|
|
|
+ actualPrice = actualPrice.add(vo.getActualPrice());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if(actualPrice.doubleValue() <= 0){
|
|
|
+ throw new BizException("退款金额不能为0");
|
|
|
+ }
|
|
|
+
|
|
|
String join = StringUtil.join(detilIds, ",");
|
|
|
|
|
|
UserOrderRefund orderRefunds = new UserOrderRefund();
|
|
@@ -253,11 +257,11 @@ public class UserOrderRefundServiceImpl extends ServiceImpl<UserOrderRefundDao,
|
|
|
HttpResponseResult<RefundCreateRes> apply = refundCreateFunction.apply(orderRefundReq);
|
|
|
if (apply.getStatus()) {
|
|
|
detilIds.add(vo.getId());
|
|
|
- actualPrice.add(apply.getData().getActualPrice());
|
|
|
+ actualPrice = actualPrice.add(apply.getData().getActualPrice());
|
|
|
}
|
|
|
} else {
|
|
|
detilIds.add(vo.getId());
|
|
|
- actualPrice.add(vo.getActualPrice());
|
|
|
+ actualPrice = actualPrice.add(vo.getActualPrice());
|
|
|
}
|
|
|
}
|
|
|
String join = StringUtil.join(detilIds, ",");
|
|
@@ -310,7 +314,8 @@ public class UserOrderRefundServiceImpl extends ServiceImpl<UserOrderRefundDao,
|
|
|
|
|
|
RefundBill refundBill = new RefundBill(payment.getOpenType(),
|
|
|
PaymentClientEnum.valueOf(payment.getPaymentClient()), payment.getPayChannel());
|
|
|
- refundBill.setId(payment.getTransNo());
|
|
|
+ refundBill.setTradeNo(payment.getTransNo());
|
|
|
+ refundBill.setPaymentNo(payment.getPaymentNo());
|
|
|
refundBill.setRefundNo(billNo.toString());
|
|
|
refundBill.setOrderAmt(payment.getPayAmt());
|
|
|
refundBill.setRefundAmt(orderRefund.getActualAmount());
|