|
@@ -68,6 +68,7 @@ class GoodsService
|
|
|
public static function selectAllByCategoryForRuleAddComponent($category = "GOODS")
|
|
|
{
|
|
|
$categoryIds = [];
|
|
|
+ $categorySuperIds = [];
|
|
|
if ($category == 'GOODS') {
|
|
|
$categorySuperIds = [5];
|
|
|
} elseif ($category == 'SERVICE') {
|
|
@@ -92,6 +93,8 @@ class GoodsService
|
|
|
// ->where('goods_classify', $category)
|
|
|
->when(!empty($categoryIds), function ($query) use ($categoryIds) {
|
|
|
$query->whereIn('join_goods_category_id', $categoryIds);
|
|
|
+ })->when(empty($categoryIds), function ($query) {
|
|
|
+ $query->where('goods_classify','<>', 'RECHARGE');
|
|
|
})->select('goods_id', 'goods_name', 'join_goods_category_id')
|
|
|
->get()
|
|
|
->toArray();
|