Explorar el Código

取消售后修改订单参数

moonsflyer hace 5 meses
padre
commit
12abcc791e
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      app/shopapi/logic/AfterSaleLogic.php

+ 5 - 0
app/shopapi/logic/AfterSaleLogic.php

@@ -323,6 +323,11 @@ class AfterSaleLogic extends BaseLogic
             if(!in_array($afterSale->sub_status,AfterSaleEnum::ALLOW_CANCEL)) {
                 throw new \think\Exception('售后处理中,不允许撤销申请');
             }
+
+            Order::update([ 'is_after_sale' => 0 ], [
+                [ 'id', '=', $afterSale['order_id'] ],
+            ]);
+
             $afterSale->status = AfterSaleEnum::STATUS_FAIL;
             $afterSale->sub_status = AfterSaleEnum::SUB_STATUS_BUYER_CANCEL_AFTER_SALE;
             $afterSale->save();