| | |
| | | name |
| | | FROM blade_region |
| | | where 1=1 |
| | | and district_code = '361102' |
| | | and district_code = '361102000000' |
| | | <if test="region.parentCode!=null and region.parentCode!=''"> |
| | | and parent_code = #{region.parentCode} |
| | | </if> |
| | | <if test="region.regionCode!=null and region.regionCode!=''"> |
| | | and code like concat('%',#{region.regionCode},'%') |
| | | <if test="isAdministrator==2"> |
| | | <choose> |
| | | <when test="regionChildCodesList !=null and regionChildCodesList.size()>0"> |
| | | and code in |
| | | <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | and code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | code as id, |
| | | parent_code as parentId, |
| | | name |
| | | FROM blade_region where district_code = '361102' |
| | | FROM blade_region where district_code = '361102000000' |
| | | and region_level = 4 |
| | | <if test="regionCode!=null and regionCode!=''"> |
| | | and code = #{regionCode} |
| | |
| | | code as id, |
| | | parent_code as parentId, |
| | | name |
| | | FROM blade_region where district_code = '361102' |
| | | FROM blade_region where district_code = '361102000000' |
| | | and region_level = 4 |
| | | <if test="regionCode!=null and regionCode!=''"> |
| | | and parent_code = #{regionCode} |