| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <?php
- // +----------------------------------------------------------------------
- // | saiadmin [ saiadmin快速开发框架 ]
- // +----------------------------------------------------------------------
- // | Author: your name
- // +----------------------------------------------------------------------
- namespace app\v1\controller\gameLog;
- use plugin\saiadmin\basic\BaseController;
- use app\v1\logic\gameLog\SdkOrderSuccessLogic;
- use app\v1\validate\gameLog\SdkOrderSuccessValidate;
- use support\Request;
- use support\Response;
- /**
- * 订单记录表(支付成功)控制器
- */
- class SdkOrderSuccessController extends BaseController
- {
- /**
- * 构造函数
- */
- public function __construct()
- {
- $this->logic = new SdkOrderSuccessLogic();
- $this->validate = new SdkOrderSuccessValidate;
- parent::__construct();
- }
- /**
- * 数据列表
- * @param Request $request
- * @return Response
- */
- public function index(Request $request): Response
- {
- $where = $request->more([
- ['game_id', ''],
- ['media_id', ''],
- ['auth_id', ''],
- ['agent_id', ''],
- ['site_id', ''],
- ['user_name', ''],
- ['server_id', ''],
- ['server_name', ''],
- ['reg_date', ''],
- ['pay_date', ''],
- ]);
- // 传入的是多选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','auth', 'pay_channel']);
- return $this->success($data);
- }
- /**
- * 导出数据
- * @param Request $request
- * @return Response
- */
- public function export(Request $request) : Response
- {
- $where = $request->more([
- ['game_id', ''],
- ['media_id', ''],
- ['auth_id', ''],
- ['agent_id', ''],
- ['site_id', ''],
- ['user_name', ''],
- ['server_id', ''],
- ['server_name', ''],
- ['reg_date', ''],
- ['pay_date', ''],
- ]);
- return $this->logic->export($where);
- }
-
- }
|