1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?php
- /**
- * GmController.php UTF-8
- *
- * @date : 2018/6/5 16:44
- *
- * @license 这不是一个自由软件,未经授权不许任何使用和传播。
- * @author : luowei <lw@huosdk.com>
- * @version : HUOSDK 8.0
- */
- namespace api\wapapp\controller\v8;
- use api\common\controller\V2ApiBaseController;
- use huo\controller\wallet\Gamemoney;
- use huolib\constant\OrderConst;
- use huolib\constant\WalletConst;
- class GmController extends V2ApiBaseController {
- public function _initialize() {
- parent::_initialize();
- $this->checkLogin();
- }
- /**
- * 游戏币消费记录
- * http://doc.1tsdk.com/138?page_id=3439
- * 【域名】/v8/gamemoney/consume_list
- */
- public function consumeRecord() {
- $_mem_id = $this->getMemId();
- $_page = get_val($this->rq_data, 'page', 0); /* 页码 默认为1 代表第一页 1 */
- $_offset = get_val($this->rq_data, 'offset', 10); /* 每页显示数量 默认为10 */
- $_map = [];
- $_page = $_page.','.$_offset;
- $_rdata = (new Gamemoney())->getMemConsumeList($_mem_id, $_map, $_page);
- return $this->returnData($_rdata);
- }
- /**
- * 游戏充值记录列表
- * http://doc.1tsdk.com/138?page_id=3440
- * 【域名】/v8/gamemoney/recharge/record_list
- */
- public function rechargeRecord() {
- $_mem_id = $this->mem_id;
- $_app_id = get_val($this->rq_data, 'app_id');
- $_page = get_val($this->rq_data, 'page', 0); /* 页码 默认为1 代表第一页 1 */
- $_offset = get_val($this->rq_data, 'offset', 10); /* 每页显示数量 默认为10 */
- $_status = get_val($this->rq_data, 'status', 0);
- $_map = [];
- $_order_status = array_keys(OrderConst::getPayStatusMsg(0,true));
- if (in_array($_status, $_order_status)) {
- $_map['status'] = $_status;
- }
- $_page = $_page.','.$_offset;
- $_where['type'] = WalletConst::WALLET_TYPE_CHARGE;
- $_rdata = (new Gamemoney())->getMemChargeList($_mem_id, $_app_id, $_map, $_page);
- return $this->returnData($_rdata);
- }
- }
|