From 42a8fc94f769f9353fea2e6f4b4d5dff68fa4cfb Mon Sep 17 00:00:00 2001 From: liyang <316606755@qq.com> Date: Fri, 19 Mar 2021 18:32:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=9F=A5=E8=AF=A2-?= =?UTF-8?q?=E6=9C=AC=E6=8E=A8=E5=B9=BF=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/QueryController.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 7894fbc41..189f23544 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1764,9 +1764,11 @@ class QueryController extends BaseController $map['create_time'] = ['between', [$createTimeBegin, $createTimeEnd]]; } if ($isSelf) { - $map['promote_id'] = $queryPromote['id']; + $map['role.promote_id'] = $queryPromote['id']; } + + $orderBy = 'create_time desc'; $sortNameData = ['login_time', 'create_time', 'role_level', 'register_time', 'role.promote_account']; if (!empty($sortName)) { @@ -1812,11 +1814,14 @@ class QueryController extends BaseController list($records, $pagination, $count) = $this->paginate($query->order($orderBy)); $countRow = $countQuery->field(['count(distinct user_id) user_count'])->find(); - + $subSql = M('user', 'tab_')->field('id')->where(['is_repeat' => 0])->select(false); $map['_string'] = str_replace('role.promote_id', 'promote_id', $map['_string']) . ' and user_id in (' . $subSql . ')'; + $map['promote_id'] = $map['role.promote_id']; + unset($map['role.promote_id']); $uniqueCountRow = M('user_play_info', 'tab_')->field(['count(distinct user_id) user_count, count(*) count'])->where($map)->find(); + /* $users = []; if (count($records) > 0) { $userIds = array_column($records, 'user_id'); From da588a3d86d5f24d98e1150863f0a71befcff062 Mon Sep 17 00:00:00 2001 From: liyang <316606755@qq.com> Date: Mon, 22 Mar 2021 10:51:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/QueryController.class.php | 2 +- Application/Home/View/default/TestingResource/batches.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 189f23544..ec413f8b3 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1844,7 +1844,7 @@ class QueryController extends BaseController $hideChar .= '*'; } - if($record['create_time'] == 0) { + if($records[$key]['create_time'] == 0) { $records[$key]['create_time'] = date('Y-m-d', $value['play_time']) . '
' . date('H:i:s', $value['play_time']); } else { $records[$key]['create_time'] = date('Y-m-d', $value['create_time']) . '
' . date('H:i:s', $value['create_time']); diff --git a/Application/Home/View/default/TestingResource/batches.html b/Application/Home/View/default/TestingResource/batches.html index 919674553..2578afd3a 100644 --- a/Application/Home/View/default/TestingResource/batches.html +++ b/Application/Home/View/default/TestingResource/batches.html @@ -84,7 +84,7 @@