调整了查询条件,增加了对class_all参数的处理。

This commit is contained in:
lewis 2025-04-18 12:06:16 +08:00
parent 197a31668e
commit bb039fcf5e

View File

@ -66,7 +66,11 @@ class WarehouseProductStoregeLists extends BaseAdminDataLists implements ListsSe
{ {
if ($this->request->get('store_name')) { if ($this->request->get('store_name')) {
$this->store_name = $this->request->get('store_name'); $this->store_name = $this->request->get('store_name');
$ids = StoreProduct::where('store_name', 'like', '%' . $this->request->get('store_name') . '%')->column('id'); $where[] = ['store_name', 'like', '%' . $this->request->get('store_name') . '%'];
if($this->request->get('class_all')){
$where[] = ['top_cate_id', 'in', $this->request->get('class_all')];
}
$ids = StoreProduct::where($where)->column('id');
if ($ids) { if ($ids) {
$this->searchWhere[] = ['product_id', 'in', $ids]; $this->searchWhere[] = ['product_id', 'in', $ids];
$this->ids = $ids; $this->ids = $ids;