From 17be05e928f26845f71d35570b1e53b558d468f2 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Thu, 07 Jul 2022 16:19:31 +0800 Subject: [PATCH] Merge branch 'master' of http://120.27.238.55:7000/r/farmer-cms --- src/main/resources/mapper/ArticleMapper.xml | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/main/resources/mapper/ArticleMapper.xml b/src/main/resources/mapper/ArticleMapper.xml index aa86fa6..61fc59f 100644 --- a/src/main/resources/mapper/ArticleMapper.xml +++ b/src/main/resources/mapper/ArticleMapper.xml @@ -22,7 +22,7 @@ and a.title like concat ('%',#{record.title},'%') </if> <if test="record.columnIds != null"> - and a.column_id = + and a.column_id in <foreach collection="record.columnIds" separator="," close=")" open="(" item="item"> #{item} </foreach> @@ -74,6 +74,12 @@ <if test="record.columnCode != null and record.columnCode != ''"> and c.column_code=#{record.columnCode} </if> + <if test="record.columnIds != null"> + and c.id in + <foreach collection="record.columnIds" item="item" open="(" close=")" separator=","> + ${item} + </foreach> + </if> </where> </select> </mapper> \ No newline at end of file -- Gitblit v1.9.1