Ver Fonte

Wesmiler

wesmiler há 5 meses atrás
pai
commit
34dfaa26a9
2 ficheiros alterados com 2 adições e 2 exclusões
  1. 1 1
      app/Models/CartModel.php
  2. 1 1
      app/Services/Api/CartService.php

+ 1 - 1
app/Models/CartModel.php

@@ -49,7 +49,7 @@ class CartModel extends BaseModel
     public function cartGoods()
     {
         return $this->hasMany(CartModel::class, 'store_id', 'store_id')
-            ->with(['goods'])
+            ->with(['goods','sku'])
             ->where(['status'=>1,'mark'=>1]);
     }
 

+ 1 - 1
app/Services/Api/CartService.php

@@ -101,7 +101,7 @@ class CartService extends BaseService
             unset($where['a.status']);
         }
 
-        $model = $this->model->with(['store','cartGoods','sku'])
+        $model = $this->model->with(['store','cartGoods'])
             ->from('carts as a')
             ->leftJoin('goods as b', 'b.id', '=', 'a.goods_id')
             ->where($where)