lrf %!s(int64=2) %!d(string=hai) anos
pai
achega
0f0582ff51
Modificáronse 2 ficheiros con 2 adicións e 1 borrados
  1. 1 1
      app/service/trade/afterSale.js
  2. 1 0
      app/service/trade/pay.js

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

@@ -57,7 +57,7 @@ class AfterSaleService extends CrudService {
     try {
       this.tran.update('AfterSale', entity._id, update);
       await this.tran.run();
-      const type = _.get(update, 'type');
+      const type = _.get(entity, 'type');
       const status = _.get(update, 'status');
       // 同意退款,则直接进行退款,然后再将状态修改为已退款
       if (type === '0' && status === '1') {

+ 1 - 0
app/service/trade/pay.js

@@ -207,6 +207,7 @@ class PayService extends CrudService {
     const url = `${this.wxDomain}/pay/payOrder`;
     const res = await this.httpUtil.cpost(url, wxOrderData);
     if (res) return res;
+    console.log(data);
     throw new BusinessError(ErrorCode.SERVICE_FAULT, '微信下单失败!');
   }