限制小程序查询数据
This commit is contained in:
parent
eb0aa5b6fc
commit
c5a21a867b
@ -46,7 +46,8 @@ class OrderList extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
{
|
{
|
||||||
$userId = $this->request->userId;
|
$userId = $this->request->userId;
|
||||||
if (!$userId) return [];
|
if (!$userId) return [];
|
||||||
$data = StoreOrder::with(['store'])->where($this->searchWhere)->where('uid', $userId)
|
$data = StoreOrder::with(['store'])->where($this->searchWhere)->where(['uid'=>$userId])
|
||||||
|
->whereIn('shipping_type',[1,2])
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()
|
->select()
|
||||||
@ -86,6 +87,6 @@ class OrderList extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
public function count(): int
|
public function count(): int
|
||||||
{
|
{
|
||||||
$userId = $this->request->userId;
|
$userId = $this->request->userId;
|
||||||
return StoreOrder::where($this->searchWhere)->where('uid', $userId)->count();
|
return StoreOrder::where($this->searchWhere)->whereIn('shipping_type',[1,2])->where('uid', $userId)->count();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user