From 2cbc6de87721b365e84b79b6bafef8147e05c130 Mon Sep 17 00:00:00 2001 From: wang hou sheng <76928547+wanghousheng@users.noreply.github.com> Date: Thu, 18 Apr 2024 00:25:50 +0800 Subject: [PATCH] 1 --- app/api/model/Goods.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/api/model/Goods.php b/app/api/model/Goods.php index b5cd0d0e..95afd3f6 100644 --- a/app/api/model/Goods.php +++ b/app/api/model/Goods.php @@ -243,7 +243,6 @@ class Goods extends GoodsModel { $list = []; $cate_goods_id = []; - $model = new PreSale(); $info = $model->where(['is_change' => 0, 'status' => 1])->field('goods_list,p_time')->find(); if (!$info->isEmpty()) { @@ -255,6 +254,9 @@ class Goods extends GoodsModel ->where(['category_id' => $param['category_id']]) ->whereIn('goods_id', $goods_ids) ->column('distinct goods_id'); + if ($cate_goods_id) { + return $list; + } } if ($cate_goods_id) { $goods_ids = $cate_goods_id;