|
|
@@ -387,7 +387,7 @@ public class WxPayServiceImpl implements WxPayService {
|
|
|
*/
|
|
|
@DS("db-miniapp")
|
|
|
@Override
|
|
|
- public Refund wxRefund(long refundLogId) {
|
|
|
+ public void wxRefund(long refundLogId) {
|
|
|
// 通过退款申请id获取退款申请记录
|
|
|
var refundLog = refundLogService.getById(refundLogId);
|
|
|
|
|
|
@@ -416,7 +416,13 @@ public class WxPayServiceImpl implements WxPayService {
|
|
|
amount.setTotal((long) refundLog.getTotal());
|
|
|
amount.setCurrency(refundLog.getCurrency());
|
|
|
request.setAmount(amount);
|
|
|
- return refundService.create(request);
|
|
|
+ var refund = refundService.create(request);
|
|
|
+
|
|
|
+ refundLog.setChannel(refund.getChannel().name());
|
|
|
+ refundLog.setFundsAccount(refund.getFundsAccount().name());
|
|
|
+ refundLog.setCurrency(refund.getAmount().getCurrency());
|
|
|
+ refundLogService.updateById(refundLog);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -455,14 +461,11 @@ public class WxPayServiceImpl implements WxPayService {
|
|
|
refundLog
|
|
|
.setRefundId(refundNotification.getRefundId())
|
|
|
.setTransactionId(refundNotification.getTransactionId())
|
|
|
- .setChannel(refundNotification.getChannel().name())
|
|
|
.setUserReceivedAccount(refundNotification.getUserReceivedAccount())
|
|
|
.setSuccessTime(successTime)
|
|
|
.setStatus(refundNotification.getRefundStatus().name())
|
|
|
- .setFundsAccount(refundNotification.getFundsAccount().name())
|
|
|
.setTotal(refundNotification.getAmount().getTotal().intValue())
|
|
|
- .setRefund(refundNotification.getAmount().getRefund().intValue())
|
|
|
- .setCurrency(refundNotification.getAmount().getCurrency());
|
|
|
+ .setRefund(refundNotification.getAmount().getRefund().intValue());
|
|
|
refundLog.setCreateTime(LocalDateTimeUtil.of(DateUtil.parse(refundNotification.getCreateTime())));
|
|
|
refundLogService.updateById(refundLog);
|
|
|
|