lrf 2 năm trước cách đây
mục cha
commit
e72383f118
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      app/service/trade/afterSale.js

+ 2 - 1
app/service/trade/afterSale.js

@@ -133,6 +133,7 @@ class AfterSaleService extends CrudService {
       await this.tran.run();
       // 退钱
       if (!refundInfo) return;
+      console.log(refundInfo);
       const res = await this.ctx.service.trade.pay.refund(refundInfo);
       if (res.errcode && res.errcode !== 0) throw new BusinessError(ErrorCode.SERVICE_FAULT, res.errmsg);
     } catch (error) {
@@ -174,7 +175,7 @@ class AfterSaleService extends CrudService {
     if (!order_no) throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '未找到微信支付订单号');
     const str = this.ctx.service.util.trade.createNonceStr();
     const out_refund_no = `${order_no}-r-${str}`;
-    const refundInfo = { reason: _.get(data, 'desc'), money: returnMoney, order_no, out_refund_no };
+    const refundInfo = { reason: _.get(data, 'desc', '购物退款'), money: returnMoney, order_no, out_refund_no };
     // 退积分
     await this.ctx.service.user.point.refundOrderPoint(order_detail, tran);
     return refundInfo;