| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- // +----------------------------------------------------------------------
- // | saiadmin [ saiadmin快速开发框架 ]
- // +----------------------------------------------------------------------
- // | Author: your name
- // +----------------------------------------------------------------------
- namespace app\v1\controller\advert;
- use plugin\saiadmin\basic\BaseController;
- use app\v1\logic\advert\AgentListLogic;
- use app\v1\validate\advert\AgentListValidate;
- use plugin\saiadmin\app\logic\system\SystemUserLogic;
- use support\Request;
- use support\Response;
- /**
- * 渠道管理控制器
- */
- class AgentListController extends BaseController
- {
- protected $systemUserLogic;
- /**
- * 构造函数
- */
- public function __construct()
- {
- $this->logic = new AgentListLogic();
- $this->validate = new AgentListValidate;
- parent::__construct();
- $this->systemUserLogic = new SystemUserLogic();
- }
- /**
- * 数据列表
- * @param Request $request
- * @return Response
- */
- public function index(Request $request): Response
- {
- $where = $request->more([
- ['auth_id', ''],
- ['name', ''],
- ]);
- $query = $this->logic->search($where);
- $data = $this->logic->getList($query);
- $data=$this->logic->trandformListColumn($data['data'],['auth','media']);
- return $this->success($data);
- }
- }
|