Merge branch 'release-1.0.0' into dev

master
ELF 5 years ago
commit b861c7fb3e

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

@ -1801,7 +1801,9 @@ class QueryController extends BaseController
$map['ui.role_name'] = ['like', $roleName . '%']; $map['ui.role_name'] = ['like', $roleName . '%'];
} }
if ($userAccount != '') { if ($userAccount != '') {
$map['ui.user_account'] = ['like', $userAccount . '%']; $userId = M('user', 'tab_')->where(array('account' => ['like', $userAccount . '%']))->getField('id');
$userId = $userId ?? 0;
$map['uc.user_id'] = $userId;
} }
if ($isSelf) { if ($isSelf) {
$map['uc.promote_id'] = $queryPromote['id']; $map['uc.promote_id'] = $queryPromote['id'];

@ -85,6 +85,7 @@
</div> </div>
</div> </div>
<div class="form-group normal_space"> <div class="form-group normal_space">
<input type="hidden" name="row" value="I('get.row', 10)">
<input type="hidden" name="last_sort_name" id="last_sort_name" value="{:I('sort_name', '')}"> <input type="hidden" name="last_sort_name" id="last_sort_name" value="{:I('sort_name', '')}">
<input type="hidden" name="sort_name" id="sort_name" value="{:I('sort_name', '')}"> <input type="hidden" name="sort_name" id="sort_name" value="{:I('sort_name', '')}">
<input type="hidden" name="sort" id="sort" value="{$sort}"> <input type="hidden" name="sort" id="sort" value="{$sort}">

Loading…
Cancel
Save