wesmiler 3 ay önce
ebeveyn
işleme
61c8e12dc8
1 değiştirilmiş dosya ile 5 ekleme ve 4 silme
  1. 5 4
      app/Services/Api/OrderService.php

+ 5 - 4
app/Services/Api/OrderService.php

@@ -143,14 +143,15 @@ class OrderService extends BaseService
      */
     public function getOrderInfo($id, $no='')
     {
-        $where = ['order_no'=>$no,'a.id' => $id, 'a.mark' => 1];
+        $where = ['a.order_no'=>$no,'a.id' => $id, 'a.mark' => 1];
         if($no){
-            unset($where['id']);
+            unset($where['a.id']);
         }else{
-            unset($where['order_no']);
+            unset($where['a.order_no']);
         }
         $statusArr = [1 => '待支付', 2 => '待发货', 3 => '待收货', 4 => '已完成'];
-        $info = $this->model->from('orders as a')->with(['orderGoods','store'])
+        $info = $this->model->from('orders as a')
+            ->with(['orderGoods','store'])
             ->leftJoin('member as b', 'b.id', '=', 'a.user_id')
             ->where($where)
             ->select(['a.*'])