123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?php
- namespace api\wapapp\controller\v8;
- use api\common\controller\V2ApiBaseController;
- use huo\controller\wallet\Ptb;
- use huolib\constant\OrderConst;
- use huolib\constant\WalletConst;
- class PtbController extends V2ApiBaseController {
- public function _initialize() {
- parent::_initialize();
- $this->checkLogin();
- }
-
- public function consumeRecord() {
- $_mem_id = $this->mem_id;
- $_page = get_val($this->rq_data, 'page', 0);
- $_offset = get_val($this->rq_data, 'offset', 10);
- $_map = [];
- $_page = $_page.','.$_offset;
- $_rdata = (new Ptb())->getMemConsumeList($_mem_id, $_map, $_page);
- return $this->returnData($_rdata);
- }
-
- public function rechargeRecord() {
- $_mem_id = $this->mem_id;
- $_page = get_val($this->rq_data, 'page', 0);
- $_offset = get_val($this->rq_data, 'offset', 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 Ptb())->getMemChargeList($_mem_id, $_map, $_page);
- return $this->returnData($_rdata);
- }
- }
|