Merge pull request '修改预定单查询、商品查询' (#383) from dev into main

Reviewed-on: #383
This commit is contained in:
mkm 2024-12-12 11:37:28 +08:00
commit fc5d749800
2 changed files with 10 additions and 3 deletions

View File

@ -34,7 +34,7 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte
{
return [
'=' => ['store_id', 'paid', 'status', 'order_type'],
'%like' => ['order_id','order_sn'],
'%like' => ['order_id','order_sn', 'mark'],
'between_time' => 'create_time'
];
}

View File

@ -68,8 +68,15 @@ class StoreProductLists extends BaseAdminDataLists implements ListsSearchInterfa
if (!empty($this->params['user_id'])) {
$userShip = User::where('id', $this->params['user_id'])->value('user_ship');
}
$list = StoreProduct::where($this->searchWhere)
->limit($this->limitOffset, $this->limitLength)
$query = StoreProduct::where($this->searchWhere);
if (isset($this->params['type_filter'])) {
if ($this->params['type_filter'] == 0) {
$query->where('product_type', 6)->where('is_show', 0);
} else {
$query->where('is_show', 1);
}
}
$list = $query->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()->each(function ($item) use($is_warehouse, $userShip) {
$item['product_id'] = $item['id'];