34 lines
850 B
PHP
34 lines
850 B
PHP
<?php
|
|
|
|
namespace app\adminapi\lists\popup;
|
|
|
|
use app\adminapi\lists\BaseAdminDataLists;
|
|
use app\common\lists\ListsSearchInterface;
|
|
use app\common\model\popup\PagePopupLog;
|
|
|
|
class PopupLogLists extends BaseAdminDataLists implements ListsSearchInterface
|
|
{
|
|
public function setSearch(): array
|
|
{
|
|
return [
|
|
'=' => ['popup_id', 'action', 'platform', 'user_id'],
|
|
'%like%' => ['device_id', 'page_path'],
|
|
];
|
|
}
|
|
|
|
public function lists(): array
|
|
{
|
|
return PagePopupLog::where($this->searchWhere)
|
|
->append(['action_text'])
|
|
->order(['id' => 'desc'])
|
|
->limit($this->limitOffset, $this->limitLength)
|
|
->select()
|
|
->toArray();
|
|
}
|
|
|
|
public function count(): int
|
|
{
|
|
return PagePopupLog::where($this->searchWhere)->count();
|
|
}
|
|
}
|