diff --git a/src/main/java/net/mingsoft/cms/action/ContentAction.java b/src/main/java/net/mingsoft/cms/action/ContentAction.java index 7a9cce3b..3ab11bbf 100755 --- a/src/main/java/net/mingsoft/cms/action/ContentAction.java +++ b/src/main/java/net/mingsoft/cms/action/ContentAction.java @@ -20,6 +20,7 @@ */ package net.mingsoft.cms.action; +import com.baomidou.mybatisplus.extension.conditions.query.QueryChainWrapper; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; diff --git a/src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml b/src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml index fc6c4b2c..d13e711d 100755 --- a/src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml +++ b/src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml @@ -157,10 +157,10 @@ and ( - find_in_set(#{categoryParentIds},CATEGORY_PARENT_IDS) + find_in_set(#{categoryParentIds},CATEGORY_PARENT_IDS)>0 - find_in_set('${id}',CATEGORY_PARENT_IDS) + find_in_set('${id}',CATEGORY_PARENT_IDS)>0 or id=#{id} @@ -208,7 +208,7 @@ and dict_id=#{dictId} and category_flag=#{categoryFlag} and category_path=#{categoryPath} - and find_in_set(#{categoryParentIds},category_parent_ids) + and find_in_set(#{categoryParentIds},category_parent_ids)>0 and create_by=#{createBy} and create_date=#{createDate} and update_by=#{updateBy} diff --git a/src/main/java/net/mingsoft/cms/dao/IContentDao.xml b/src/main/java/net/mingsoft/cms/dao/IContentDao.xml index 45e4644a..e69506c0 100755 --- a/src/main/java/net/mingsoft/cms/dao/IContentDao.xml +++ b/src/main/java/net/mingsoft/cms/dao/IContentDao.xml @@ -218,7 +218,7 @@ ct.del=0 and content_title like 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))) + (select id FROM cms_category where find_in_set('${categoryId}',CATEGORY_PARENT_IDS)>0)) and content_type LIKE CONCAT('%',#{contentType},'%') and content_display=#{contentDisplay} and content_author=#{contentAuthor} @@ -250,7 +250,7 @@ and (ct.category_id=#{categoryId} or ct.category_id in - (select id FROM cms_category where find_in_set('${categoryId}',CATEGORY_PARENT_IDS))) + (select id FROM cms_category where find_in_set('${categoryId}',CATEGORY_PARENT_IDS)>0)) and content_datetime >= #{beginTime} @@ -293,7 +293,7 @@ a.del=0 - and FIND_IN_SET(a.category_id,#{ids}) + and FIND_IN_SET(a.category_id,#{ids})>0 and a.content_title like CONCAT("%",#{map.content_title},"%") @@ -306,7 +306,7 @@ and - FIND_IN_SET('${item}',a.content_type) + FIND_IN_SET('${item}',a.content_type)>0