|
|
@@ -2,6 +2,7 @@
|
|
|
namespace app\workerapi\lists;
|
|
|
|
|
|
use app\common\lists\ListsSearchInterface;
|
|
|
+use app\common\model\goods_category\GoodsCategory;
|
|
|
use app\common\model\spare_part\SparePart;
|
|
|
|
|
|
|
|
|
@@ -39,7 +40,10 @@ class SparePartLists extends BaseWorkerDataLists implements ListsSearchInterface
|
|
|
*/
|
|
|
public function lists(): array
|
|
|
{
|
|
|
+ //去除清洗的所有分类
|
|
|
+ $not_category_goods_ids = GoodsCategory::where('category_type',3)->column('id');
|
|
|
return SparePart::where($this->searchWhere)
|
|
|
+ ->whereNotIn('goods_category_id',$not_category_goods_ids)
|
|
|
->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'])
|