From a183d6ff6bf9eccea1077b12b9868b9e2e601fcf Mon Sep 17 00:00:00 2001 From: wangyuting Date: Mon, 20 May 2024 14:38:12 +0800 Subject: [PATCH] * Fix story vision bug. --- module/story/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/story/model.php b/module/story/model.php index 8731ca2261..f828781fb4 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -141,7 +141,7 @@ class storyModel extends model ->where('t1.version=t2.version') ->andWhere('t1.id')->in($storyIdList) ->beginIF($mode != 'all')->andWhere('t1.deleted')->eq('0')->fi() - ->beginIF($this->config->vision == 'or')->andWhere('t1.vision')->in('or')->fi() + ->beginIF($this->config->vision == 'or')->andWhere("FIND_IN_SET('or', t1.vision)")->fi() ->fetchAll('id'); } @@ -155,7 +155,7 @@ class storyModel extends model */ public function getPairsByList(array|string $storyIdList): array { - $storyPairs = $this->dao->select('id, title')->from(TABLE_STORY)->where('id')->in($storyIdList)->beginIF($this->config->vision == 'or')->andWhere('t1.vision')->in('or')->fi()->fetchPairs(); + $storyPairs = $this->dao->select('id, title')->from(TABLE_STORY)->where('id')->in($storyIdList)->beginIF($this->config->vision == 'or')->andWhere("FIND_IN_SET('or', t1.vision)")->fi()->fetchPairs(); return array(0 => '') + $storyPairs; }