Merge pull request '调整了查询条件,增加了对class_all参数的处理。' (#22) from dev into main

Reviewed-on: #22
This commit is contained in:
mkm 2025-04-18 12:07:45 +08:00
commit a89f7fbe28

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;