管理后台->游戏订单->游戏充值--日期检索更新

master
chenxiaojun 5 years ago
commit 1bf12d3a6d

@ -83,8 +83,14 @@ class SpendController extends ThinkController
$order = ' pay_time desc ';
}
$map1 = $map;
$map1['pay_status'] = 1;
if (intval(($endTime + 1) - $startTime) / (24 * 3600) <= 31) {
$map1 = $map;
$map1['pay_status'] = 1;
} else {
$map = '1 = 2';
$map1 = $map;
}
$total = null_to_0(D(self::model_name)->where($map1)->sum('pay_amount'));
$ttotal = null_to_0(D(self::model_name)->where('pay_time' . total(1))->where(array('pay_status' => 1))->sum('pay_amount'));
$ytotal = null_to_0(D(self::model_name)->where('pay_time' . total(5))->where(array('pay_status' => 1))->sum('pay_amount'));

@ -280,6 +280,17 @@
$(function () {
//搜索功能
$("#search").click(function () {
var sdate = Date.parse($('#time-start').val()) / 1000;
var edate = Date.parse($('#time-end').val()) / 1000;
if (sdate > edate) {
layer.msg('开始时间必须小于等于结束时间');
return false;
}
if ((edate - sdate) > 2592000) {
layer.msg('时间间隔不能超过31天请重新选择日期');
return false;
}
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&" + $('.jssearch').find('select').serialize();

Loading…
Cancel
Save