|
@@ -4,8 +4,9 @@
|
|
|
|
|
|
<select id="queryPageListByFilters" resultType="org.jeecg.modules.kms.knowledge.entity.Article">
|
|
|
select distinct t0.* from kms_knowledge_article t0
|
|
|
- inner join kms_article_category_r t1 on t0.id = t1.article_id
|
|
|
+ inner join kms_article_category_r t1 on t0.id = t1.article_id
|
|
|
where t0.status = 2
|
|
|
+ AND t0.is_public != '1'
|
|
|
<if test="filterParam.categoryId != null and filterParam.categoryId != ''">
|
|
|
AND t1.category_id = #{filterParam.categoryId}
|
|
|
</if>
|
|
@@ -13,5 +14,30 @@
|
|
|
AND t0.title like CONCAT(CONCAT('%', #{filterParam.keyWords}), '%')
|
|
|
</if>
|
|
|
${sql}
|
|
|
+
|
|
|
+ UNION
|
|
|
+
|
|
|
+ select distinct t0.* from kms_knowledge_article t0
|
|
|
+ inner join kms_article_category_r t1 on t0.id = t1.article_id
|
|
|
+ where t0.status = 2
|
|
|
+ AND t0.is_public != '0'
|
|
|
+ <if test="filterParam.categoryId != null and filterParam.categoryId != ''">
|
|
|
+ AND t1.category_id = #{filterParam.categoryId}
|
|
|
+ </if>
|
|
|
+ <if test="filterParam.keyWords != null and filterParam.keyWords != ''">
|
|
|
+ AND t0.title like CONCAT(CONCAT('%', #{filterParam.keyWords}), '%')
|
|
|
+ </if>
|
|
|
</select>
|
|
|
+<!-- <select id="queryPageListByFilters" resultType="org.jeecg.modules.kms.knowledge.entity.Article">-->
|
|
|
+<!-- select distinct t0.* from kms_knowledge_article t0-->
|
|
|
+<!-- inner join kms_article_category_r t1 on t0.id = t1.article_id-->
|
|
|
+<!-- where t0.status = 2 AND t0.is_public != '1'-->
|
|
|
+<!-- <if test="filterParam.categoryId != null and filterParam.categoryId != ''">-->
|
|
|
+<!-- AND t1.category_id = #{filterParam.categoryId}-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="filterParam.keyWords != null and filterParam.keyWords != ''">-->
|
|
|
+<!-- AND t0.title like CONCAT(CONCAT('%', #{filterParam.keyWords}), '%')-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- ${sql}-->
|
|
|
+<!-- </select>-->
|
|
|
</mapper>
|