优化系统商店列表分页逻辑
调整 SystemStoreLists 类中的查询逻辑,用 $this->limitOffset 和 $this->limitLength 替代固定的限制数量,实现可配置的分页大小和偏移量。
This commit is contained in:
parent
73800a2154
commit
2ddd560df7
@ -51,6 +51,7 @@ class SystemStoreLists extends BaseAdminDataLists implements ListsSearchInterfac
|
||||
$latitude = $this->request->get('latitude', '');
|
||||
$longitude = $this->request->get('longitude', '');
|
||||
$cart_id = $this->request->get('cart_id', '');
|
||||
|
||||
$where[] = ['is_show', '=', YesNoEnum::YES];
|
||||
$data = SystemStore::where($this->searchWhere)->where($where)
|
||||
->field([
|
||||
@ -70,7 +71,7 @@ class SystemStoreLists extends BaseAdminDataLists implements ListsSearchInterfac
|
||||
'is_send',
|
||||
'abbreviation'
|
||||
])
|
||||
->limit(100)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
|
Loading…
x
Reference in New Issue
Block a user