From f7aaa9030e71179da400cba4fa3c480f48b82d31 Mon Sep 17 00:00:00 2001 From: "elf@home" <360197197@qq.com> Date: Fri, 18 Oct 2019 07:56:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/QueryController.class.php | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 8fb672574..2e2f7d35a 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1826,10 +1826,20 @@ class QueryController extends BaseController 'grand_id' => $promote['id'], ]; if ($headmanPromoteId > 0) { - $map['parent_id'] = $headmanPromoteId; + $map = [ + '_logic' => 'or', + 'id' => $headmanPromoteId, + 'parent_id' => $headmanPromoteId, + 'grand_id' => $headmanPromoteId, + ]; } if ($promoteId > 0) { - $map['id'] = $promoteId; + $map = [ + '_logic' => 'or', + 'id' => $promoteId, + 'parent_id' => $promoteId, + 'grand_id' => $promoteId, + ]; } $ids = M('promote', 'tab_')->where($map)->getField('id', true); @@ -1922,10 +1932,20 @@ class QueryController extends BaseController 'grand_id' => $promote['id'], ]; if ($headmanPromoteId > 0) { - $map['parent_id'] = $headmanPromoteId; + $map = [ + '_logic' => 'or', + 'id' => $headmanPromoteId, + 'parent_id' => $headmanPromoteId, + 'grand_id' => $headmanPromoteId, + ]; } if ($promoteId > 0) { - $map['id'] = $promoteId; + $map = [ + '_logic' => 'or', + 'id' => $promoteId, + 'parent_id' => $promoteId, + 'grand_id' => $promoteId, + ]; } $ids = M('promote', 'tab_')->where($map)->getField('id', true);