From 869d06b5dbd77267208bb236dd30c6ac9364cec6 Mon Sep 17 00:00:00 2001 From: li kesong Date: Sun, 23 Jan 2022 18:10:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B9=90=E8=A7=82=E9=94=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Forms/SelectHorseman.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/Admin/Forms/SelectHorseman.php b/app/Admin/Forms/SelectHorseman.php index e24fafd..148f48c 100644 --- a/app/Admin/Forms/SelectHorseman.php +++ b/app/Admin/Forms/SelectHorseman.php @@ -40,7 +40,15 @@ class SelectHorseman extends Form $hid = $input['horseman_id']; $oid = $input['order_id']; $horseman = LanzuEmployees::getName($hid);//骑手名称 - $result = ImsCjdcOrderMain::where('id',$oid)->update(['shipping_type'=>1,'horseman_id'=>$hid,'delivery_start_time'=>time(),'shipping_name'=>$horseman,'updated_at'=>time()]); + $time = time(); + $result = ImsCjdcOrderMain::where(['id' => $oid, 'horseman_id' => 0]) + ->update([ + 'shipping_type' => 1, + 'horseman_id' => $hid, + 'delivery_start_time' => $time, + 'shipping_name' => $horseman, + 'updated_at' => $time, + ]); if ($result){ //>>1.指定骑手后,初始化骑手位置,默认将市场经纬做为骑手默认经纬 $row = ImsCjdcOrderMain::where('id',$oid)->select('market_id','global_order_id')->first();