|
|
|
@ -3166,8 +3166,10 @@ class DownloadController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!empty($map['user_account'])) {
|
|
|
|
|
$map['ui.user_account'] = $map['user_account'];
|
|
|
|
|
unset($map['user_account']);
|
|
|
|
|
$userId = M('user', 'tab_')->where(array('account' => $map['user_account']))->getField('id');
|
|
|
|
|
$userId = $userId ?? 0;
|
|
|
|
|
$map['uc.user_id'] = $userId;
|
|
|
|
|
unset($map['user_account']);
|
|
|
|
|
}
|
|
|
|
|
if(!empty($map['promote_id'])) {
|
|
|
|
|
$map['uc.promote_id'] = $map['promote_id'];
|
|
|
|
@ -3231,7 +3233,7 @@ class DownloadController extends BaseController {
|
|
|
|
|
->field('sum(recharge_cost) recharge_cost,sum(recharge_count) recharge_count,sum(recharge_cost_today) as recharge_cost_today')
|
|
|
|
|
->find();
|
|
|
|
|
$userIds = array_column($roles, 'user_id');
|
|
|
|
|
$userIds = $userIds ?? [-1];
|
|
|
|
|
$userIds = $userIds ? $userIds : [-1];
|
|
|
|
|
$users = M('user', 'tab_')->where(array('id' => ['in', $userIds]))->getField('id, account', true);
|
|
|
|
|
$csvFileName = $xlsName.'.csv';
|
|
|
|
|
//设置好告诉浏览器要下载excel文件的headers
|
|
|
|
|