|
|
|
@ -44,23 +44,23 @@ class DepositController extends ThinkController {
|
|
|
|
|
$map['promote_id']=$_REQUEST['promote_id'];
|
|
|
|
|
}
|
|
|
|
|
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));
|
|
|
|
|
$map['payed_time'] =array('BETWEEN',array(strtotime($_REQUEST['time-start']),strtotime($_REQUEST['time-end'])+24*60*60-1));
|
|
|
|
|
unset($_REQUEST['time-start']);unset($_REQUEST['time-end']);
|
|
|
|
|
}elseif(isset($_REQUEST['time-start'])){
|
|
|
|
|
$map['create_time'] = ['GT',strtotime(I('time-start'))];
|
|
|
|
|
$map['payed_time'] = ['GT',strtotime(I('time-start'))];
|
|
|
|
|
unset($_REQUEST['time-start']);
|
|
|
|
|
}elseif(isset($_REQUEST['time-end'])){
|
|
|
|
|
$map['create_time'] = ['LT',strtotime(I('time-end'))+86399];
|
|
|
|
|
$map['payed_time'] = ['LT',strtotime(I('time-end'))+86399];
|
|
|
|
|
unset($_REQUEST['time-end']);
|
|
|
|
|
}
|
|
|
|
|
if(isset($_REQUEST['start'])&&isset($_REQUEST['end'])){
|
|
|
|
|
$map['create_time'] =array('BETWEEN',array(strtotime($_REQUEST['start']),strtotime($_REQUEST['end'])+24*60*60-1));
|
|
|
|
|
$map['payed_time'] =array('BETWEEN',array(strtotime($_REQUEST['start']),strtotime($_REQUEST['end'])+24*60*60-1));
|
|
|
|
|
unset($_REQUEST['start']);unset($_REQUEST['end']);
|
|
|
|
|
}elseif(isset($_REQUEST['start'])){
|
|
|
|
|
$map['create_time'] = ['GT',strtotime(I('start'))];
|
|
|
|
|
$map['payed_time'] = ['GT',strtotime(I('start'))];
|
|
|
|
|
unset($_REQUEST['start']);
|
|
|
|
|
}elseif(isset($_REQUEST['end'])){
|
|
|
|
|
$map['create_time'] = ['LT',strtotime(I('end'))+86399];
|
|
|
|
|
$map['payed_time'] = ['LT',strtotime(I('end'))+86399];
|
|
|
|
|
unset($_REQUEST['end']);
|
|
|
|
|
}
|
|
|
|
|
if(isset($_REQUEST['pay_way'])) {
|
|
|
|
@ -97,8 +97,8 @@ class DepositController extends ThinkController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$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'));
|
|
|
|
|
$ttotal=null_to_0(D(self::model_name)->where('payed_time'.total(1))->where(array('pay_status'=>1))->sum('pay_amount'));
|
|
|
|
|
$ytotal=null_to_0(D(self::model_name)->where('payed_time'.total(5))->where(array('pay_status'=>1))->sum('pay_amount'));
|
|
|
|
|
$this->assign('total',$total);
|
|
|
|
|
$this->assign('ttotal',$ttotal);
|
|
|
|
|
$this->assign('ytotal',$ytotal);
|
|
|
|
|