| | |
| | | FROM |
| | | sys_jurisdiction dept |
| | | WHERE dept.is_deleted = 0 |
| | | <if test="param2!=null and param2!=''"> |
| | | and dept.parent_id = #{param2} |
| | | </if> |
| | | <if test="param1!=null and param1!=''"> |
| | | and dept.tenant_id = #{param1} |
| | | </if> |
| | |
| | | sys_jurisdiction dept |
| | | WHERE dept.is_deleted = 0 |
| | | </select> |
| | | <select id="lazyTreeJu" resultMap="treeNodeResultMap" > |
| | | SELECT |
| | | dept.id, |
| | | dept.parent_id, |
| | | dept.dept_name AS title, |
| | | dept.id AS "value", |
| | | dept.id AS "key", |
| | | ( |
| | | SELECT |
| | | CASE |
| | | |
| | | WHEN COUNT |
| | | ( 1 ) > 0 THEN |
| | | 1 ELSE 0 |
| | | END |
| | | FROM |
| | | sys_jurisdiction |
| | | WHERE |
| | | parent_id = dept.id |
| | | AND is_deleted = 0 |
| | | ) AS "has_children" |
| | | FROM |
| | | sys_jurisdiction dept |
| | | WHERE |
| | | dept.is_deleted = 0 |
| | | </select> |
| | | </mapper> |