| | |
| | | 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> |