Ver Fonte

预约订单

wanghaijun há 4 anos atrás
pai
commit
3ea8324630
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      app/Http/Controllers/AppiontController.php

+ 2 - 1
app/Http/Controllers/AppiontController.php

xqd
@@ -162,8 +162,9 @@ class AppiontController extends Controller
         $orders = Order::select('id')
             ->where(['product_type'=>4,'order_status'=>7])
             ->where('appoint_end_time','<',$st)->get();
+        if(request('c') && !empty($orders)) return count($orders->toArray());
         foreach ($orders as $order){
-            Order::where('id',$order->id)->update(['order_status'=>4]);
+            Order::where('id',$order->id)->update(['order_status'=>6]);
         }
     }