Merge branch 'hotfix/download'

master
sunke 5 years ago
commit 33184df45c

@ -1225,7 +1225,7 @@ class DownloadController extends BaseController {
// $this->ajaxReturn(array("status" => -1, "msg" => "添加导出日志失败", 'ret' => $res));
$this->error('添加下载失败');
}
$this->success('添加下载成功',U('listsIndex'));
$this->success('添加下载成功,导出数据不包含当天',U('listsIndex'));
}
public function userRecharge_data_export() {
@ -1246,7 +1246,7 @@ class DownloadController extends BaseController {
$initEndTime = empty(I('endtime')) ? $initEndTime : I('endtime');
$begTime = strtotime($initBegTime);
$endTime = strtotime($initEndTime);
$endTime += 3600 * 24;
if(!empty(I('endtime'))) { $endTime = $endTime + 24 *3600; }
$map1['chain'] = ['like','%'.'/'.PID.'/'.'%'];
$rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select();
@ -2955,8 +2955,7 @@ class DownloadController extends BaseController {
->buildSql();
$map['_string'] = 'ui.role_id in (' . $subQuery . ')';
}
$secondDay = 24*3600 + 1;
$map['uc.create_time'] = ['between', [$map['begintime'], $map['endtime'] - $secondDay]];
$map['uc.create_time'] = ['between', [$map['begintime'], $map['endtime'] - 1]];
unset($map['begintime']);
unset($map['endtime']);
//$spendMap['_string'] = 'uc.game_id = tab_user_play_info.game_id and uc.server_id = tab_user_play_info.server_id and uc.role_id = tab_user_play_info.role_id';
@ -2965,7 +2964,7 @@ class DownloadController extends BaseController {
$field = $fieldUC . ',' . $fieldUI;
$subQuery = M('user_play_data_count', 'tab_')->alias('uc')
->field($field)
->join('left join tab_user_play_info as ui on ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id')
->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id')
->where($map)
->group('uc.role_id,uc.server_id,uc.game_id')
->buildSql();
@ -2975,7 +2974,7 @@ class DownloadController extends BaseController {
$total = [];
$total = M('user_play_data_count', 'tab_')->alias('uc')
->field($fieldUC)
->join('left join tab_user_play_info as ui on ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id')
->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id')
->where($map)
->find();
foreach ($roles as $role) {

Loading…
Cancel
Save