|
|
@@ -371,7 +371,7 @@ public class WxPayServiceImpl implements WxPayService {
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public void applyWxRefund() {
|
|
|
+ public void applyWxRefund(String reason) {
|
|
|
var userId = StpUtil.getLoginIdAsLong();
|
|
|
var chargeOrder = chargeOrderService.getChargingOrderByUserId(userId);
|
|
|
if (chargeOrder != null) {
|
|
|
@@ -451,6 +451,7 @@ public class WxPayServiceImpl implements WxPayService {
|
|
|
discountAmount = account.getDiscountAmount() - refundLogList.stream().mapToInt(RefundLog::getDiscountAmount).sum();
|
|
|
}
|
|
|
refundLog.setDiscountAmount(discountAmount);
|
|
|
+ refundLog.setReason(reason);
|
|
|
newRefundLogList.add(index, refundLog);
|
|
|
}));
|
|
|
|