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);