|
|
|
@ -10,7 +10,7 @@ use User\Api\UserApi as UserApi;
|
|
|
|
|
class DepositController extends ThinkController {
|
|
|
|
|
const model_name = 'Deposit';
|
|
|
|
|
|
|
|
|
|
public function lists(){
|
|
|
|
|
public function lists($p = 1){
|
|
|
|
|
if(isset($_REQUEST['user_account'])){
|
|
|
|
|
$map['user_account']=array('like','%'.trim($_REQUEST['user_account']).'%');
|
|
|
|
|
unset($_REQUEST['user_account']);
|
|
|
|
@ -38,16 +38,10 @@ class DepositController extends ThinkController {
|
|
|
|
|
|
|
|
|
|
}else if(isset($_REQUEST['promote_id']) && $_REQUEST['promote_id']==0){
|
|
|
|
|
$map['promote_id']=array('elt',0);
|
|
|
|
|
unset($_REQUEST['promote_id']);
|
|
|
|
|
unset($_REQUEST['promote_name']);
|
|
|
|
|
}elseif(isset($_REQUEST['promote_name'])&&$_REQUEST['promote_id']==-1){
|
|
|
|
|
$map['promote_id']=get_promote_id($_REQUEST['promote_name']);
|
|
|
|
|
unset($_REQUEST['promote_id']);
|
|
|
|
|
unset($_REQUEST['promote_name']);
|
|
|
|
|
}else{
|
|
|
|
|
$map['promote_id']=$_REQUEST['promote_id'];
|
|
|
|
|
unset($_REQUEST['promote_id']);
|
|
|
|
|
unset($_REQUEST['promote_name']);
|
|
|
|
|
}
|
|
|
|
|
if(isset($_REQUEST['time-start'])&&isset($_REQUEST['time-end'])){
|
|
|
|
|
$map['create_time'] =array('BETWEEN',array(strtotime($_REQUEST['time-start']),strtotime($_REQUEST['time-end'])+24*60*60-1));
|
|
|
|
@ -94,6 +88,47 @@ class DepositController extends ThinkController {
|
|
|
|
|
|
|
|
|
|
$map1=$map;
|
|
|
|
|
$map1['pay_status']=1;
|
|
|
|
|
|
|
|
|
|
if($_REQUEST['promote_id']||$_REQUEST['promote_id']=='0') {
|
|
|
|
|
$page = intval($p);
|
|
|
|
|
$page = $page ? $page : 1; //默认显示第一页数据
|
|
|
|
|
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
|
|
|
|
|
$map1['order_status'] = 1;
|
|
|
|
|
unset($map1['pay_status']);
|
|
|
|
|
if ($map['pay_status']) {
|
|
|
|
|
$map['order_status']=$map['pay_status'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$total=null_to_0(D('coin_pay_order')->where($map1)->sum('pay_amount'));
|
|
|
|
|
$ttotal=null_to_0(D('coin_pay_order')->where('create_time'.total(1))->where(array('pay_status'=>1))->sum('pay_amount'));
|
|
|
|
|
$ytotal=null_to_0(D('coin_pay_order')->where('create_time'.total(5))->where(array('pay_status'=>1))->sum('pay_amount'));
|
|
|
|
|
$this->assign('total',$total);
|
|
|
|
|
$this->assign('ttotal',$ttotal);
|
|
|
|
|
$this->assign('ytotal',$ytotal);
|
|
|
|
|
|
|
|
|
|
$data = D('coin_pay_order')
|
|
|
|
|
/* 查询指定字段,不指定则查询所有字段 */
|
|
|
|
|
->field('*,order_status as pay_status')
|
|
|
|
|
// 查询条件
|
|
|
|
|
->where($map)
|
|
|
|
|
/* 默认通过id逆序排列 */
|
|
|
|
|
->order("id desc")
|
|
|
|
|
/* 数据分页 */
|
|
|
|
|
->page($page, $row)
|
|
|
|
|
/* 执行查询 */
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
|
|
/* 查询记录总数 */
|
|
|
|
|
$count = D('coin_pay_order')->where($map)->count();
|
|
|
|
|
|
|
|
|
|
$page = set_pagination($count,$row);
|
|
|
|
|
if($page) {$this->assign('_page', $page);}
|
|
|
|
|
|
|
|
|
|
$this->assign('list_data', $data);
|
|
|
|
|
$this->meta_title = '平台币充值列表';
|
|
|
|
|
$this->display('lists');die();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$total=null_to_0(D(self::model_name)->where($map1)->sum('pay_amount'));
|
|
|
|
|
$ttotal=null_to_0(D(self::model_name)->where('create_time'.total(1))->where(array('pay_status'=>1))->sum('pay_amount'));
|
|
|
|
|
$ytotal=null_to_0(D(self::model_name)->where('create_time'.total(5))->where(array('pay_status'=>1))->sum('pay_amount'));
|
|
|
|
@ -105,6 +140,7 @@ class DepositController extends ThinkController {
|
|
|
|
|
$this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Deposit/lists','status'=>1])->find());
|
|
|
|
|
|
|
|
|
|
$this->assign("is_admin",is_administrator());
|
|
|
|
|
|
|
|
|
|
parent::lists(self::model_name,$_GET["p"],$map);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|