智慧保安后台管理-外网项目备份
zhongrj
2023-09-17 8853292babb2ad94de4a3207966f1e83b767cd2d
src/main/java/org/springblade/modules/system/mapper/DictBizMapper.xml
@@ -48,4 +48,35 @@
        select id, parent_id, dict_value as title, id as "value", id as "key" from blade_dict_biz where is_deleted = 0 and parent_id = 0
    </select>
    <!--getDicTree list-->
    <select id="getDicTreeList" resultType="org.springblade.modules.system.node.TreeNode">
         select
            bdb.id,
            bdb.dict_value as name,
            bdb.parent_id parentId,
            exists(
                select 1 from blade_dict_biz bdb1
                where bdb1.parent_id = bdb.id and  bdb1.is_sealed = 0 and bdb1.is_deleted = 0
            ) as hasChildren
        from
            blade_dict_biz bdb
    </select>
    <!--getDicTree  map-->
    <select id="getDicTreeMap" resultType="org.springblade.modules.system.node.TreeNode">
         select
            bdb.id,
            bdb.dict_value as name,
            bdb.parent_id parentId,
            exists(
                select 1 from blade_dict_biz bdb1
                where bdb1.parent_id = bdb.id and  bdb1.is_sealed = 0 and bdb1.is_deleted = 0
            ) as hasChildren
        from
            blade_dict_biz bdb
        where
            1=1
        and bdb.parent_id = 0
    </select>
</mapper>