|
|
@@ -41,9 +41,9 @@ class SparePartLists extends BaseWorkerDataLists implements ListsSearchInterface
|
|
|
public function lists(): array
|
|
|
{
|
|
|
//去除清洗的所有分类
|
|
|
- $not_category_goods_ids = GoodsCategory::where('category_type',3)->column('id');
|
|
|
+ $goods_category_id = !empty($this->params['goods_category_id'])?$this->params['goods_category_id']:999999;
|
|
|
return SparePart::where($this->searchWhere)
|
|
|
- ->whereNotIn('goods_category_id',$not_category_goods_ids)
|
|
|
+ ->where('goods_category_id',$goods_category_id)
|
|
|
->field(['id', 'goods_category_id', 'spare_name', 'spare_image', 'spare_number', 'spare_unit', 'company_price', 'original_price', 'offering_price', 'spare_status'])
|
|
|
->limit($this->limitOffset, $this->limitLength)
|
|
|
->order(['id' => 'desc'])
|