diff --git a/app/admin/lists/store_order_cart_info/StoreOrderCartInfoTwoLists.php b/app/admin/lists/store_order_cart_info/StoreOrderCartInfoTwoLists.php index 468e3ee92..8874e9358 100644 --- a/app/admin/lists/store_order_cart_info/StoreOrderCartInfoTwoLists.php +++ b/app/admin/lists/store_order_cart_info/StoreOrderCartInfoTwoLists.php @@ -23,6 +23,7 @@ use app\common\model\system_store\SystemStore; class StoreOrderCartInfoTwoLists extends BaseAdminDataLists implements ListsSearchInterface, ListsExcelInterface { + public $ids; /** * @notes 设置搜索条件 * @return \string[][] @@ -49,6 +50,16 @@ class StoreOrderCartInfoTwoLists extends BaseAdminDataLists implements ListsSear */ public function lists(): array { + if ($this->request->get('store_name')) { + $store_name = $this->request->get('store_name'); + $ids = StoreProduct::where('store_name', 'like', '%' . $store_name . '%')->column('id'); + if ($ids) { + $this->searchWhere[] = ['product_id', 'in', $ids]; + $this->ids = $ids; + } else { + return []; + } + } if ($this->request->get('start_time') == '') { $this->searchWhere[] = ['create_time', 'between', [strtotime(date('Y-m-d 00:00:00')), strtotime(date('Y-m-d 23:59:59'))]]; }