默认时间

master
sunke 5 years ago
parent 0886dfc5d0
commit 806cded7d6

@ -1182,13 +1182,20 @@ class DownloadController extends BaseController {
} }
if (!empty(I('begtime')) && empty(I('endtime'))) { if (!empty(I('begtime')) && empty(I('endtime'))) {
$map['tab_spend.pay_time'] = ['egt', strtotime(I('begtime'))]; $map['tab_spend.pay_time'] = ['egt', strtotime(I('begtime'))];
} elseif (empty(I('begtime')) && !empty(I('endtime'))) { } elseif (empty(I('begtime')) && !empty(I('endtime'))) {
$map['tab_spend.pay_time'] = ['elt', strtotime(I('endtime')) + 86399]; $map['tab_spend.pay_time'] = ['elt', strtotime(I('endtime')) + 86399];
} elseif (!empty(I('begtime')) && !empty(I('endtime'))) { } elseif (!empty(I('begtime')) && !empty(I('endtime'))) {
$map['tab_spend.pay_time'] = ['between', [strtotime(I('begtime')), strtotime(I('endtime')) + 86399]]; $map['tab_spend.pay_time'] = ['between', [strtotime(I('begtime')), strtotime(I('endtime')) + 86399]];
}else {
$nowTime = date('Y-m-d');
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
$initEndTime = date('Y-m-d');
$initBegTime = strtotime($initBegTime);
$initEndTime = strtotime($initEndTime);
$map['tab_spend.pay_time'] = ['between',[$initBegTime,$initEndTime]];
} }
empty(I('relation_game_id')) || $map['tab_game.relation_game_id'] = I('relation_game_id'); empty(I('relation_game_id')) || $map['tab_game.relation_game_id'] = I('relation_game_id');

Loading…
Cancel
Save