From 1fed7cdfc6696d22bd619ac10a803bd7e21c8a6a Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Thu, 7 Nov 2019 19:52:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/PromoteController.class.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index a407002c1..ad549db1c 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -874,8 +874,19 @@ class PromoteController extends BaseController if (count($ids) > 0) { $countList = M('promote', 'tab_')->field(['count(*)' => 'count', 'parent_id' => 'parent_id'])->where(['parent_id' => ['in', $ids]])->group('parent_id')->select(); $playerList = M('user_play', 'tab_')->field(['count(*)' => 'count', 'promote_id' => 'promote_id'])->where(['promote_id' => ['in', $ids]])->group('promote_id')->select(); - $shiftList = M('shift_task', 'sys_')->field(['count(*)' => 'count', 'from_promote_id' => 'from_promote_id'])->where(['status' => 0, 'type' => 1, 'from_promote_id' => ['in', $ids]])->group('from_promote_id')->select(); - $shiftPlayerList = M('shift_task', 'sys_')->field(['count(*)' => 'count', 'from_promote_id' => 'from_promote_id'])->where(['status' => 0, 'type' => 2, 'from_promote_id' => ['in', $ids]])->group('from_promote_id')->select(); + + $shiftList = M('shift_task', 'sys_') + ->field(['count(*)' => 'count', 'from_promote_id' => 'from_promote_id']) + ->where(['status' => 0, 'type' => 1, 'from_promote_id' => ['in', $ids]]) + ->group('from_promote_id') + ->select(); + + $shiftPlayerList = M('shift_task', 'sys_') + ->field(['count(*)' => 'count', 'from_promote_id' => 'from_promote_id']) + ->where(['status' => 0, 'type' => 2, 'from_promote_id' => ['in', $ids]]) + ->group('from_promote_id') + ->select(); + $hasChildList = array_column($countList, 'parent_id'); $hasPlayerList = array_column($playerList, 'promote_id'); $hasShiftList = array_column($shiftList, 'from_promote_id');