diff --git a/src/main/java/net/mingsoft/cms/dao/IContentDao.xml b/src/main/java/net/mingsoft/cms/dao/IContentDao.xml index 8d023989..4b226457 100644 --- a/src/main/java/net/mingsoft/cms/dao/IContentDao.xml +++ b/src/main/java/net/mingsoft/cms/dao/IContentDao.xml @@ -18,7 +18,6 @@ - @@ -219,7 +218,7 @@ ct.del=0 and content_title like CONCAT('%',#{contentTitle},'%') - and (category_id=#{categoryId} or category_id in + and (ct.category_id=#{categoryId} or ct.category_id in (select id FROM cms_category where )) and content_type LIKE CONCAT('%',#{contentType},'%') and content_display=#{contentDisplay} @@ -256,12 +255,12 @@ select ct.id article_id,c.* FROM cms_content ct - LEFT JOIN cms_category c ON category_id = c.id + LEFT JOIN cms_category c ON ct.category_id = c.id where ct.del=0 - and (category_id=#{categoryId} or category_id in + and (ct.category_id=#{categoryId} or ct.category_id in (select id FROM cms_category where )) @@ -305,7 +304,7 @@ a.del=0 - and FIND_IN_SET(category_id,#{ids}) + and FIND_IN_SET(a.category_id,#{ids}) and a.content_title like CONCAT("%",#{map.content_title},"%")