| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- // +----------------------------------------------------------------------
- // | saiadmin [ saiadmin快速开发框架 ]
- // +----------------------------------------------------------------------
- // | Author: your name
- // +----------------------------------------------------------------------
- namespace app\v1\controller\gameLog;
- use plugin\saiadmin\basic\BaseController;
- use app\v1\logic\gameLog\SdkLoginLogLogic;
- use app\v1\validate\gameLog\SdkLoginLogValidate;
- use support\Request;
- use support\Response;
- /**
- * 登录日志控制器
- */
- class SdkLoginLogController extends BaseController
- {
- /**
- * 构造函数
- */
- public function __construct()
- {
- $this->logic = new SdkLoginLogLogic();
- $this->validate = new SdkLoginLogValidate;
- parent::__construct();
- }
- /**
- * 数据列表
- * @param Request $request
- * @return Response
- */
- public function index(Request $request): Response
- {
- $where = $request->more([
- ['user_name', ''],
- ['game_id', ''],
- ['media_id', ''],
- ['agent_id', ''],
- ['site_id', ''],
- ['auth_id', ''],
- ['login_time', ''],
- ['reg_time', ''],
- ]);
- // 传入的是多选game_id, 转换成字符串
- $where['game_id'] = is_array($where['game_id']) ? implode(',', $where['game_id']) : $where['game_id'];
-
- $query = $this->logic->searchByAuth($where);
- $data = $this->logic->getList($query);
- $data['data'] = $this->logic->trandformListColumn($data['data'], ['game', 'ip', 'agent']);
- return $this->success($data);
- }
- }
|