【BUG】解决退款时找不到appkey的问题
This commit is contained in:
parent
d0b60bf9b4
commit
b48d0edef0
|
@ -37,7 +37,7 @@ public interface AfterSaleConvert {
|
|||
@Mapping(target = "creator", ignore = true),
|
||||
@Mapping(target = "updater", ignore = true),
|
||||
})
|
||||
AfterSaleDO convert(AppAfterSaleCreateReqVO createReqVO, TradeOrderItemDO tradeOrderItem);
|
||||
PayRefundCreateReqDTO convert(String userIp, AfterSaleDO afterSale);
|
||||
|
||||
@Mappings({
|
||||
@Mapping(source = "afterSale.orderId", target = "merchantOrderId"),
|
||||
|
|
|
@ -371,8 +371,9 @@ public class AfterSaleServiceImpl implements AfterSaleService {
|
|||
@Override
|
||||
public void afterCommit() {
|
||||
// 创建退款单
|
||||
PayRefundCreateReqDTO createReqDTO = AfterSaleConvert.INSTANCE.convert(userIp, afterSale, tradeOrderProperties)
|
||||
PayRefundCreateReqDTO createReqDTO = AfterSaleConvert.INSTANCE.convert(userIp, afterSale)
|
||||
.setReason(StrUtil.format("退款【{}】", afterSale.getSpuName()));
|
||||
createReqDTO.setAppKey(tradeOrderProperties.getPayAppKey());
|
||||
Long payRefundId = payRefundApi.createRefund(createReqDTO);
|
||||
// 更新售后单的退款单号
|
||||
tradeAfterSaleMapper.updateById(new AfterSaleDO().setId(afterSale.getId()).setPayRefundId(payRefundId));
|
||||
|
|
Loading…
Reference in New Issue