diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 695c1c244..1f632a097 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -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 diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 2ab422f72..9d82ca4ab 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1801,7 +1801,9 @@ class QueryController extends BaseController $map['ui.role_name'] = ['like', $roleName . '%']; } 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) { $map['uc.promote_id'] = $queryPromote['id']; diff --git a/Application/Home/View/default/Query/userRecharges.html b/Application/Home/View/default/Query/userRecharges.html index 541918ba3..6cff84622 100644 --- a/Application/Home/View/default/Query/userRecharges.html +++ b/Application/Home/View/default/Query/userRecharges.html @@ -85,6 +85,7 @@
+