|
@@ -583,6 +583,7 @@ class GoodsService
|
|
|
$categorySuperId = $request->get('category_super_id', '');
|
|
|
$joinGoodsCategoryId = $request->get('join_goods_category_id', '');
|
|
|
$type = $request->get('type', '');
|
|
|
+ $classify = $request->get('classify', '');
|
|
|
if (!$categoryIds && !$categorySuperId && !$joinGoodsCategoryId) {
|
|
|
return json_fail('参数异常');
|
|
|
}
|
|
@@ -631,7 +632,10 @@ class GoodsService
|
|
|
->leftJoin('goods_running', 'goods_running.join_running_goods_id', '=', 'goods.goods_id')
|
|
|
->where('goods_running.goods_running_storage', '>', 0)
|
|
|
->whereIn('join_goods_category_id', $goodsCategoryIds)
|
|
|
- ->where('goods_status', 'ON');
|
|
|
+ ->where('goods_status', 'ON')
|
|
|
+ ->when(!empty($classify), function ($query) use ($classify) {
|
|
|
+ $query->where('goods_classify', $classify);
|
|
|
+ });
|
|
|
|
|
|
if ($type == 'dishes') {
|
|
|
$uid = JwtToken::getCurrentId();
|