作者 何书鹏

bug修改

@@ -84,6 +84,7 @@ class Litestoreorder extends Backend @@ -84,6 +84,7 @@ class Litestoreorder extends Backend
84 { 84 {
85 $id = input('post.ids'); 85 $id = input('post.ids');
86 $row = $this->model->get($id); 86 $row = $this->model->get($id);
  87 + $row['pay_status'] == '10' && $this->error('订单未支付,禁止分配骑手');
87 $row['freight_status'] = "20"; 88 $row['freight_status'] = "20";
88 $row['freight_time'] = time(); 89 $row['freight_time'] = time();
89 $row['rider_user_id'] = input('post.virtual_name'); 90 $row['rider_user_id'] = input('post.virtual_name');
@@ -320,10 +320,10 @@ class Rider extends Api @@ -320,10 +320,10 @@ class Rider extends Api
320 ->find(); 320 ->find();
321 if ($order['rider_status'] == 20) $this->error('该订单已送达'); 321 if ($order['rider_status'] == 20) $this->error('该订单已送达');
322 $order->rider_status = '20'; 322 $order->rider_status = '20';
323 - $order->isUpdate()->save(); 323 + $order->save();
324 $rider_order->status = '2'; 324 $rider_order->status = '2';
325 $rider_order->sendtime = time(); 325 $rider_order->sendtime = time();
326 - $rider_order->isUpdate()->save(); 326 + $rider_order->save();
327 $user = $this->auth->getUser(); 327 $user = $this->auth->getUser();
328 $data = [ 328 $data = [
329 'user_id' => $this->auth->id, 329 'user_id' => $this->auth->id,