|
@@ -9,7 +9,25 @@
|
|
|
</update>
|
|
|
|
|
|
<!-- 【vue3专用】 -->
|
|
|
- <select id="queryListByPid" parameterType="java.lang.Object"
|
|
|
+<!-- <select id="queryListByPid" parameterType="java.lang.Object"-->
|
|
|
+<!-- resultType="org.jeecg.common.system.vo.SelectTreeModel">-->
|
|
|
+<!-- select-->
|
|
|
+<!-- id as "key",-->
|
|
|
+<!-- name as "title",-->
|
|
|
+<!-- id as "value",-->
|
|
|
+<!-- (case when has_child = '1' then 0 else 1 end) as isLeaf,-->
|
|
|
+<!-- pid as parentId-->
|
|
|
+<!-- from kms_bas_article_category-->
|
|
|
+<!-- where pid = #{pid}-->
|
|
|
+<!-- <if test="query != null">-->
|
|
|
+<!-- <foreach collection="query.entrySet()" item="value" index="key">-->
|
|
|
+<!-- and ${key} = #{value}-->
|
|
|
+<!-- </foreach>-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- ${sql}-->
|
|
|
+<!-- </select>-->
|
|
|
+
|
|
|
+ <select id="queryListByPidPrivilege" parameterType="java.lang.Object"
|
|
|
resultType="org.jeecg.common.system.vo.SelectTreeModel">
|
|
|
select
|
|
|
id as "key",
|
|
@@ -18,7 +36,7 @@
|
|
|
(case when has_child = '1' then 0 else 1 end) as isLeaf,
|
|
|
pid as parentId
|
|
|
from kms_bas_article_category
|
|
|
- where pid = #{pid}
|
|
|
+ where pid = #{pid} AND (is_public IS NULL OR is_public = '0')
|
|
|
<if test="query != null">
|
|
|
<foreach collection="query.entrySet()" item="value" index="key">
|
|
|
and ${key} = #{value}
|
|
@@ -27,4 +45,21 @@
|
|
|
${sql}
|
|
|
</select>
|
|
|
|
|
|
+ <select id="queryListByPidNoPrivilege" parameterType="java.lang.Object"
|
|
|
+ resultType="org.jeecg.common.system.vo.SelectTreeModel">
|
|
|
+ select
|
|
|
+ id as "key",
|
|
|
+ name as "title",
|
|
|
+ id as "value",
|
|
|
+ (case when has_child = '1' then 0 else 1 end) as isLeaf,
|
|
|
+ pid as parentId
|
|
|
+ from kms_bas_article_category
|
|
|
+ where pid = #{pid} and is_public = '1'
|
|
|
+ <if test="query != null">
|
|
|
+ <foreach collection="query.entrySet()" item="value" index="key">
|
|
|
+ and ${key} = #{value}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|