lrf 2 лет назад
Родитель
Сommit
497f87a1f0
1 измененных файлов с 1 добавлено и 2 удалено
  1. 1 2
      app/service/trade/afterSale.js

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

@@ -133,7 +133,6 @@ 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) {
@@ -255,7 +254,7 @@ class AfterSaleService extends CrudService {
     const goodsList = _.get(orderDetail, 'goods');
     const order = await this.orderModel.findById(order_id);
     if (!order) throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '未找到支付订单信息');
-    this.tran.update('OrderDetail', order_detail, '-1');
+    this.tran.update('OrderDetail', order_detail, { status: '-1' });
     // 实付的钱
     const realPay = await this.ctx.service.util.orderDetail.computedRealPay(orderDetail);
     // 组成退款单号