diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 8ffbd1820..ce3fc9763 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -2728,15 +2728,21 @@ class DownloadController extends BaseController { ); $subMap = []; - $subMap['game_id'] = $map['game_id']; - $subMap['server_id'] = $map['server_id']; + if(!empty($map['game_id'])) { + $subMap['game_id'] = $map['game_id']; + } + if(!empty($map['server_id'])) { + $subMap['server_id'] = $map['server_id']; + } $costBegin = $map['costbegin']; $costEnd = $map['costend']; unset($map['costbegin']); unset($map['costend']); - $roleIds = M('user_play_data_count', 'tab_')->group('role_id')->getField('role_id', true); + + $subMap['create_time'] = ['between', [$map['begintime'], $map['endtime'] - 1]]; + $roleIdMap = $subMap; + $roleIds = M('user_play_data_count', 'tab_')->where($roleIdMap)->group('role_id')->getField('role_id', true); $map['role_id'] = ['in', $roleIds]; - $subMap['create_time'] = ['between', [$map['begintime'], $map['endtime'] - 1]]; if ($costBegin != '' || $costEnd != '') { $having = ''; if ($costBegin != '' && $costEnd != '') { @@ -2767,7 +2773,7 @@ class DownloadController extends BaseController { ->buildSql(); $spendMap['uc.create_time'] = ['between', [strtotime(date('Y-m-d 00:00:00')), strtotime(date('Y-m-d 23:59:59'))]]; - + $sqlTodayCost = M('user_play_data_count', 'tab_')->alias('uc') ->field('sum(uc.recharge_count) count') ->where($spendMap) diff --git a/Application/Home/View/default/Query/userRecharges.html b/Application/Home/View/default/Query/userRecharges.html index f09abebed..b760808bc 100644 --- a/Application/Home/View/default/Query/userRecharges.html +++ b/Application/Home/View/default/Query/userRecharges.html @@ -172,7 +172,7 @@
- 导出 + 导出 {$pagination}