|
|
|
@ -52,12 +52,12 @@ class GoodsCategoryRel extends BaseModel |
|
|
|
|
|
|
|
|
|
public static function getcategory(int $storeId = null,int $merchantId = null) { |
|
|
|
|
$list = Goods::alias('a') |
|
|
|
|
->join('goods_category_rel b', 'a.goods_id = b.goods_id') |
|
|
|
|
->rightjoin('goods_category_rel b', 'a.goods_id = b.goods_id') |
|
|
|
|
->where([ |
|
|
|
|
'a.store_id' => $storeId, |
|
|
|
|
'b.store_id' => $storeId, |
|
|
|
|
'a.merchant_id' => $merchantId |
|
|
|
|
//'b.category_id' => $_GET['category_id'] |
|
|
|
|
])->field('b.category_id')->select()->toArray(); |
|
|
|
|
])->group('category_id') |
|
|
|
|
->select(); |
|
|
|
|
return $list; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|