From 90950c995e1c0cce08f79c4588a4ecef6b417764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E5=98=89?= <445241500@qq.com> Date: Fri, 24 May 2024 23:14:25 +0800 Subject: [PATCH] 1 --- app/api/controller/Category.php | 2 +- app/common/model/GoodsCategoryRel.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/controller/Category.php b/app/api/controller/Category.php index 4b836ca3..e05111ad 100644 --- a/app/api/controller/Category.php +++ b/app/api/controller/Category.php @@ -50,7 +50,7 @@ class Category extends Controller $merchantId = (int)$this->request->param('merchantId', 0); $model = new CategoryModel; $hasGoods = GoodsCategoryRel::getcategory($this->storeId,$merchantId); - + print_r($hasGoods);die; $arr = []; if (!empty($arr)) { $arr = ['cataIds' => $hasGoods]; diff --git a/app/common/model/GoodsCategoryRel.php b/app/common/model/GoodsCategoryRel.php index 36d165bb..7cc52520 100644 --- a/app/common/model/GoodsCategoryRel.php +++ b/app/common/model/GoodsCategoryRel.php @@ -59,7 +59,7 @@ class GoodsCategoryRel extends BaseModel } $list = Goods::alias('a') ->rightjoin('goods_category_rel b', 'a.goods_id = b.goods_id') - ->where($where)->group('category_id') + ->field('category_id')->where($where)->group('category_id') ->select(); return $list; }