no message
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace app\adminapi\lists\popup;
|
||||
|
||||
use app\adminapi\lists\BaseAdminDataLists;
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
use app\common\model\popup\PagePopup;
|
||||
|
||||
class PopupLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'%like%' => ['name', 'page_path', 'title'],
|
||||
'=' => ['status', 'popup_type'],
|
||||
];
|
||||
}
|
||||
|
||||
public function lists(): array
|
||||
{
|
||||
return PagePopup::where($this->searchWhere)
|
||||
->field([
|
||||
'id',
|
||||
'name',
|
||||
'page_path',
|
||||
'popup_type',
|
||||
'image',
|
||||
'title',
|
||||
'link_type',
|
||||
'link_url',
|
||||
'frequency',
|
||||
'auto_close_seconds',
|
||||
'is_closable',
|
||||
'start_time',
|
||||
'end_time',
|
||||
'target_platform',
|
||||
'sort',
|
||||
'status',
|
||||
'show_count',
|
||||
'click_count',
|
||||
'close_count',
|
||||
'create_time',
|
||||
'update_time'
|
||||
])
|
||||
->order(['sort' => 'desc', 'id' => 'desc'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->select()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
public function count(): int
|
||||
{
|
||||
return PagePopup::where($this->searchWhere)->count();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user