refactor(store_product): 移除查询中的 field 方法

移除了 StoreProduct::where 查询中的 field 方法调用。这个修改可能是为了简化查询
This commit is contained in:
mkm 2024-10-30 15:43:40 +08:00
parent 9c63e3ac9d
commit a2c561711c

View File

@ -63,7 +63,6 @@ class StoreProductLists extends BaseAdminDataLists implements ListsSearchInterfa
}
$is_warehouse=$this->request->get('is_warehouse',0);
return StoreProduct::where($this->searchWhere)
->field(['id', 'image', 'store_info', 'store_name', 'top_cate_id', 'two_cate_id', 'swap', 'product_type', 'cate_id', 'batch', 'price', 'vip_price', 'sales', 'stock', 'is_show', 'unit', 'cost', 'rose', 'purchase', 'bar_code', 'manufacturer_information'])
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()->each(function ($item) use($is_warehouse) {