| | |
| | | </where> |
| | | ORDER BY region."ad_code" |
| | | </select> |
| | | |
| | | <select id="lazyTreeAll" resultType="cn.gistack.common.node.TreeNode"> |
| | | SELECT |
| | | region."ad_code" AS "id", |
| | | region."p_ad_code" AS "parent_id", |
| | | region."ad_name" AS "title", |
| | | region."ad_code" AS "value", |
| | | region."ad_grad" AS "adGrad", |
| | | region."ad_code" AS "key", |
| | | ( SELECT CASE WHEN count( 1 ) > 0 THEN 1 ELSE 0 END FROM "SJZT_MD"."att_ad_base" WHERE "p_ad_code" = region."ad_code" ) AS "has_children" |
| | | FROM |
| | | "SJZT_MD"."att_ad_base" region |
| | | <where> |
| | | <if test="param1!=null"> |
| | | and region."p_ad_code" = #{param1} |
| | | </if> |
| | | <if test="param2.code!=null and param2.code!=''"> |
| | | and region."ad_code" like concat(concat('%', #{param2.code}),'%') |
| | | </if> |
| | | <if test="param2.name!=null and param2.name!=''"> |
| | | and region."ad_name" like concat(concat('%', #{param2.name}),'%') |
| | | </if> |
| | | </where> |
| | | ORDER BY region."ad_code" |
| | | </select> |
| | | |
| | | </mapper> |