作者 耿培杰

添加确认收货接口

@@ -1323,6 +1323,7 @@ class Order extends Api @@ -1323,6 +1323,7 @@ class Order extends Api
1323 public function receiving(){ 1323 public function receiving(){
1324 $model = new OrderDetail(); 1324 $model = new OrderDetail();
1325 $order_detail_id = $this->request->param('order_detail_id'); 1325 $order_detail_id = $this->request->param('order_detail_id');
  1326 + if (!$order_detail_id) $this->error('缺少参数 order_detail_id');
1326 $orderInfo = $model->where(['id'=>$order_detail_id])->find(); 1327 $orderInfo = $model->where(['id'=>$order_detail_id])->find();
1327 if ($orderInfo['status'] != 3) $this->error('此订单状态不可确认收货'); 1328 if ($orderInfo['status'] != 3) $this->error('此订单状态不可确认收货');
1328 $res = $model->where(['id'=>$order_detail_id])->update(['status'=>4]); 1329 $res = $model->where(['id'=>$order_detail_id])->update(['status'=>4]);