From ea461213bf61cfe82a50973031ff40ecd2666baa Mon Sep 17 00:00:00 2001 From: xierz Date: Tue, 15 Dec 2020 11:59:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E8=8C=83CONCAT=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E4=BB=A5=E9=80=82=E9=85=8Doracle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/net/mingsoft/cms/dao/IContentDao.xml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/net/mingsoft/cms/dao/IContentDao.xml b/src/main/java/net/mingsoft/cms/dao/IContentDao.xml index e69506c0..f6e0aafd 100755 --- a/src/main/java/net/mingsoft/cms/dao/IContentDao.xml +++ b/src/main/java/net/mingsoft/cms/dao/IContentDao.xml @@ -160,7 +160,7 @@ select * from cms_content del=0 - and content_title like CONCAT('%',#{contentTitle},'%') + and content_title like CONCAT(CONCAT('%',#{contentTitle}),'%') and category_id=#{categoryId} and content_type=#{contentType} and content_display=#{contentDisplay} @@ -216,10 +216,10 @@ join cms_category cc on ct.category_id=cc.id ct.del=0 - and content_title like CONCAT('%',#{contentTitle},'%') + and content_title like CONCAT(CONCAT('%',#{contentTitle}),'%') and (ct.category_id=#{categoryId} or ct.category_id in (select id FROM cms_category where find_in_set('${categoryId}',CATEGORY_PARENT_IDS)>0)) - and content_type LIKE CONCAT('%',#{contentType},'%') + and content_type LIKE CONCAT(CONCAT('%',#{contentType}),'%') and content_display=#{contentDisplay} and content_author=#{contentAuthor} and content_source=#{contentSource} @@ -296,13 +296,13 @@ and FIND_IN_SET(a.category_id,#{ids})>0 - and a.content_title like CONCAT("%",#{map.content_title},"%") + and a.content_title like CONCAT(CONCAT("%",#{map.content_title}),"%") - and a.content_author like CONCAT("%",#{map.content_author},"%") + and a.content_author like CONCAT(CONCAT("%",#{map.content_author}),"%") - and a.content_source like CONCAT("%",#{map.content_source},"%") + and a.content_source like CONCAT(CONCAT("%",#{map.content_source}),"%") and @@ -310,13 +310,13 @@ - and a.content_description like CONCAT("%",#{map.content_description},"%") + and a.content_description like CONCAT(CONCAT("%",#{map.content_description}),"%") - and a.content_keyword like CONCAT("%",#{map.content_keyword},"%") + and a.content_keyword like CONCAT(CONCAT("%",#{map.content_keyword}),"%") - and a.content_details like CONCAT("%",#{map.content_details},"%") + and a.content_details like CONCAT(CONCAT("%",#{map.content_details}),"%") and a.content_datetime between #{map.content_datetime_start} and #{map.content_datetime_end} @@ -324,7 +324,7 @@ - and d.${field.key} like CONCAT("%",#{item.value},"%") + and d.${field.key} like CONCAT(CONCAT("%",#{item.value}),"%")