From b2ea8b4a5ec5113a5d1a5384990769b5b57e5f3c Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Fri, 15 Mar 2024 17:47:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A2=E5=8D=95=E9=87=91?= =?UTF-8?q?=E9=A2=9D=E5=8C=B9=E9=85=8D=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/store/order/StoreOrderRepository.php | 5 ++--- app/controller/api/store/order/StoreOrder.php | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) 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));