diff --git a/application/admin/controller/orders/Dispatchrecord.php b/application/admin/controller/orders/Dispatchrecord.php index defc19f..38bd945 100644 --- a/application/admin/controller/orders/Dispatchrecord.php +++ b/application/admin/controller/orders/Dispatchrecord.php @@ -154,6 +154,12 @@ class Dispatchrecord extends Backend $dispatch->follow = 1; } $dispatch->record_count ++; + + //将其它的状态改掉 + Dispatchrecord::where('dispatch_id',$dispatch->id)->where('status',0)->update([ + 'status' => 1, + ]); + //$params['admin_id'] = $this->auth->id; $result = $this->model->allowField(true)->save($params); $dispatch->allowField(true)->save();