master
sunke 5 years ago
parent 67864f82a0
commit 623bc0d44f

@ -2728,15 +2728,21 @@ class DownloadController extends BaseController {
); );
$subMap = []; $subMap = [];
$subMap['game_id'] = $map['game_id']; if(!empty($map['game_id'])) {
$subMap['server_id'] = $map['server_id']; $subMap['game_id'] = $map['game_id'];
}
if(!empty($map['server_id'])) {
$subMap['server_id'] = $map['server_id'];
}
$costBegin = $map['costbegin']; $costBegin = $map['costbegin'];
$costEnd = $map['costend']; $costEnd = $map['costend'];
unset($map['costbegin']); unset($map['costbegin']);
unset($map['costend']); 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]; $map['role_id'] = ['in', $roleIds];
$subMap['create_time'] = ['between', [$map['begintime'], $map['endtime'] - 1]];
if ($costBegin != '' || $costEnd != '') { if ($costBegin != '' || $costEnd != '') {
$having = ''; $having = '';
if ($costBegin != '' && $costEnd != '') { if ($costBegin != '' && $costEnd != '') {
@ -2767,7 +2773,7 @@ class DownloadController extends BaseController {
->buildSql(); ->buildSql();
$spendMap['uc.create_time'] = ['between', [strtotime(date('Y-m-d 00:00:00')), strtotime(date('Y-m-d 23:59:59'))]]; $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') $sqlTodayCost = M('user_play_data_count', 'tab_')->alias('uc')
->field('sum(uc.recharge_count) count') ->field('sum(uc.recharge_count) count')
->where($spendMap) ->where($spendMap)

@ -172,7 +172,7 @@
</div> </div>
<div class="pagenation clearfix"> <div class="pagenation clearfix">
<?php if ($loginer['level'] !== 4) :?> <?php if ($loginer['level'] !== 4) :?>
<a id="sch-btn" data-href="{:U('download/userRecharge_data_export',array_merge(['xlsname'=>'ceshi'],I('post.')))}" class="ajax-get">导出</a> <a id="sch-btn" data-href="{:U('download/userRecharge_data_export',array_merge(['xlsname'=>'ceshi'],I('get.')))}" class="ajax-get">导出</a>
<?php endif ;?> <?php endif ;?>
{$pagination} {$pagination}
</div> </div>

Loading…
Cancel
Save