feature/main20240421
郭嘉 6 months ago
parent b84bc8ad87
commit 90950c995e
  1. 2
      app/api/controller/Category.php
  2. 2
      app/common/model/GoodsCategoryRel.php

@ -50,7 +50,7 @@ class Category extends Controller
$merchantId = (int)$this->request->param('merchantId', 0); $merchantId = (int)$this->request->param('merchantId', 0);
$model = new CategoryModel; $model = new CategoryModel;
$hasGoods = GoodsCategoryRel::getcategory($this->storeId,$merchantId); $hasGoods = GoodsCategoryRel::getcategory($this->storeId,$merchantId);
print_r($hasGoods);die;
$arr = []; $arr = [];
if (!empty($arr)) { if (!empty($arr)) {
$arr = ['cataIds' => $hasGoods]; $arr = ['cataIds' => $hasGoods];

@ -59,7 +59,7 @@ class GoodsCategoryRel extends BaseModel
} }
$list = Goods::alias('a') $list = Goods::alias('a')
->rightjoin('goods_category_rel b', 'a.goods_id = b.goods_id') ->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(); ->select();
return $list; return $list;
} }

Loading…
Cancel
Save