diff --git a/app/common/repositories/store/order/StoreOrderRepository.php b/app/common/repositories/store/order/StoreOrderRepository.php index 73a5f8a3..48f8d9d1 100644 --- a/app/common/repositories/store/order/StoreOrderRepository.php +++ b/app/common/repositories/store/order/StoreOrderRepository.php @@ -2574,14 +2574,13 @@ class StoreOrderRepository extends BaseRepository public function dealGoodsList($where,$money) { - $data = ProductAttrValue::getDB()->alias('a') + $data = ProductAttrValue::alias('a') ->leftJoin('store_product p', 'a.product_id = p.product_id') ->where($where) - ->where('a.stock', '>', 0) ->field('a.value_id,a.product_id,a.mer_id,a.sku,a.stock,a.image,a.price, a.svip_price, a.unique,p.store_name,p.store_info'); - $list = $data->select(); + $list = $data->limit(100)->select(); $count = $data->count(); $minMoney = bcsub($money, 600, 2); diff --git a/app/controller/api/store/order/StoreOrder.php b/app/controller/api/store/order/StoreOrder.php index 9c45da28..99a2b950 100644 --- a/app/controller/api/store/order/StoreOrder.php +++ b/app/controller/api/store/order/StoreOrder.php @@ -314,12 +314,11 @@ class StoreOrder extends BaseController return app('json')->fail('参数缺失'); } $where = [ + "a.mer_id" => $merId, "p.is_show" => 1, "p.status" => 1, - "p.product_type" => 0, "p.is_gift_bag" => 0 ]; - $where['a.mer_id'] = $merId; return app('json')->success($this->repository->dealGoodsList($where,$money));