You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.6 KiB
PHP

<?php
/**
* Created by PhpStorm.
* User: xmy 280564871@qq.com
* Date: 2017/4/8
* Time: 9:41
*/
namespace Admin\Controller;
use Admin\Model\BindRechargeModel;
class BindRechargeRecordController extends ThinkController{
public function _initialize()
{
$this->meta_title = "绑币充值记录";
return parent::_initialize(); // TODO: Change the autogenerated stub
}
public function lists($p=1){
$model = new BindRechargeModel();
empty(I('game_id')) || $map['game_id'] = I('game_id');
empty(I("pay_way")) || $map['pay_way'] = I("pay_way");
empty(I('pay_status')) || $map['pay_status'] = I('pay_status');
empty(I("account")) || $map['user_account'] = ["like","%".I("account")."%"];
if(!empty(I("time_start")) && !empty(I("time_end"))){
$map['create_time'] = ["between",[strtotime(I("time_start")),strtotime(I("time_end"))+86400-1]];
}elseif(!empty(I("time_start"))){
$map['create_time'] = ["between",[strtotime(I("time_start")),time()]];
}elseif(!empty(I("time_end"))){
$map['create_time'] = ["LT",(strtotime(I("time_end"))+86400-1)];
}
empty(I('pay_order_number')) || $map['pay_order_number'] = I('pay_order_number','');
$data = $model->getLists($map,"create_time desc",$p);
$this->assign("data",$data);
//分页
$count = $data['count'];
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
$page = set_pagination($count,$row);
if($page) {$this->assign('_page', $page);}
$this->m_title = '绑币充值';
$this->assign('commonset',M('Kuaijieicon')->where(['url'=>'BindRechargeRecord/lists','status'=>1])->find());
$this->display();
}
}