| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?php
- // +----------------------------------------------------------------------
- // | saiadmin [ saiadmin快速开发框架 ]
- // +----------------------------------------------------------------------
- // | Author: your name
- // +----------------------------------------------------------------------
- namespace app\v1\controller\customer;
- use plugin\saiadmin\basic\BaseController;
- use app\v1\logic\customer\SdkOrderLogic;
- use app\v1\validate\customer\SdkOrderValidate;
- use support\Request;
- use support\Response;
- /**
- * 用户订单记录控制器
- */
- class SdkOrderController extends BaseController
- {
- /**
- * 构造函数
- */
- public function __construct()
- {
- $this->logic = new SdkOrderLogic();
- $this->validate = new SdkOrderValidate;
- parent::__construct();
- }
- /**
- * 数据列表
- * @param Request $request
- * @return Response
- */
- public function index(Request $request): Response
- {
- $where = $request->more([
- ['orderid', ''],
- ['tradeid', ''],
- ['game_id', ''],
- ['user_name', ''],
- ['role_id', ''],
- ['pay_date', ''],
- ['orderBy', ''],
- ['orderType', ''],
- ['page',''],
- ['limit','']
- ]);
- // 账号名|订单号|交易订单号 不能同时为空
- if(empty($where['user_name']) && empty($where['orderid']) && empty($where['tradeid'])){
- return $this->fail('账号名|订单号|交易订单号 不能同时为空');
- }
- // $query = $this->logic->search($where);
- // $data = $this->logic->getList($query);
- $data = $this->logic->getOrderList($where);
- return $this->success($data);
- }
- /**
- * 补发
- * @param Request $request
- * @return Response
- */
- public function send(Request $request): Response
- {
- $orderid = $request->input('orderid');
- $data = $this->logic->send($orderid);
- return $this->success($data);
- }
- }
|