master
ELF 4 years ago
parent 0ff1089682
commit b9779df6b1

@ -44,23 +44,23 @@ class DepositController extends ThinkController {
$map['promote_id']=$_REQUEST['promote_id']; $map['promote_id']=$_REQUEST['promote_id'];
} }
if(isset($_REQUEST['time-start'])&&isset($_REQUEST['time-end'])){ 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']); unset($_REQUEST['time-start']);unset($_REQUEST['time-end']);
}elseif(isset($_REQUEST['time-start'])){ }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']); unset($_REQUEST['time-start']);
}elseif(isset($_REQUEST['time-end'])){ }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']); unset($_REQUEST['time-end']);
} }
if(isset($_REQUEST['start'])&&isset($_REQUEST['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']); unset($_REQUEST['start']);unset($_REQUEST['end']);
}elseif(isset($_REQUEST['start'])){ }elseif(isset($_REQUEST['start'])){
$map['create_time'] = ['GT',strtotime(I('start'))]; $map['payed_time'] = ['GT',strtotime(I('start'))];
unset($_REQUEST['start']); unset($_REQUEST['start']);
}elseif(isset($_REQUEST['end'])){ }elseif(isset($_REQUEST['end'])){
$map['create_time'] = ['LT',strtotime(I('end'))+86399]; $map['payed_time'] = ['LT',strtotime(I('end'))+86399];
unset($_REQUEST['end']); unset($_REQUEST['end']);
} }
if(isset($_REQUEST['pay_way'])) { 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')); $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')); $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('create_time'.total(5))->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('total',$total);
$this->assign('ttotal',$ttotal); $this->assign('ttotal',$ttotal);
$this->assign('ytotal',$ytotal); $this->assign('ytotal',$ytotal);

@ -1303,6 +1303,12 @@ class ExportController extends Controller
break; break;
case 8: case 8:
//操作日志 //操作日志
if (I('start', '') == '') {
$this->error('请选择充值开始时间');
}
if (I('end', '') == '') {
$this->error('请选择充值结束时间');
}
$GetData = $_GET; $GetData = $_GET;
unset($GetData['xlsname']); unset($GetData['xlsname']);
unset($GetData['id']); unset($GetData['id']);
@ -1342,12 +1348,12 @@ class ExportController extends Controller
$map['promote_id'] = $_REQUEST['promote_id']; $map['promote_id'] = $_REQUEST['promote_id'];
} }
if (isset($_REQUEST['time-start']) && isset($_REQUEST['time-end'])) { 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-start']);
unset($_REQUEST['time-end']); unset($_REQUEST['time-end']);
} }
if (isset($_REQUEST['start']) && isset($_REQUEST['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['start']);
unset($_REQUEST['end']); unset($_REQUEST['end']);
} }
@ -1359,7 +1365,7 @@ class ExportController extends Controller
$map['pay_status'] = $_REQUEST['pay_status']; $map['pay_status'] = $_REQUEST['pay_status'];
unset($_REQUEST['pay_status']); unset($_REQUEST['pay_status']);
} }
if ($_REQUEST['merchant_id']) { if (isset($_REQUEST['merchant_id']) && $_REQUEST['merchant_id']) {
$map['merchant_id'] = $_REQUEST['merchant_id']; $map['merchant_id'] = $_REQUEST['merchant_id'];
unset($_REQUEST['merchant_id']); unset($_REQUEST['merchant_id']);
} }

Loading…
Cancel
Save