| | |
| | | </select>--> |
| | | |
| | | <select id="getList" resultMap="dictResultMap"> |
| | | select id, tenant_id, parent_id, code, dict_key, dict_value, sort, remark from blade_dict_biz where code = #{param1} and parent_id > 0 and is_sealed = 0 and is_deleted = 0 |
| | | SELECT |
| | | id, |
| | | tenant_id, |
| | | parent_id, |
| | | CODE, |
| | | dict_key, |
| | | dict_value, |
| | | sort, |
| | | remark |
| | | FROM |
| | | blade_dict_biz |
| | | WHERE |
| | | CODE = #{param1} |
| | | and parent_id > 0 |
| | | and is_sealed = 0 |
| | | and is_deleted = 0 |
| | | </select> |
| | | |
| | | <select id="tree" resultMap="treeNodeResultMap"> |
| | | select id, parent_id, dict_value as title, id as "value", id as "key" from blade_dict_biz where is_deleted = 0 |
| | | SELECT |
| | | id, |
| | | parent_id, |
| | | dict_value AS title, |
| | | id AS "value", |
| | | dict_key AS "key", |
| | | ( |
| | | SELECT |
| | | CASE WHEN count(1) > 0 THEN 1 ELSE 0 END |
| | | FROM |
| | | blade_dict_biz |
| | | WHERE |
| | | parent_id = id and is_deleted = 0 |
| | | ) AS hasChildren |
| | | FROM |
| | | blade_dict_biz |
| | | <where> |
| | | <if test="param1 != null and param1 != ''"> |
| | | CODE = #{param1} |
| | | and parent_id > 0 |
| | | </if> |
| | | and is_deleted = 0 |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | <select id="parentTree" resultMap="treeNodeResultMap"> |