| | |
| | | jg.sort |
| | | FROM jczz_grid jg |
| | | left join blade_region br on br.village_code = jg.community_code and br.region_level = 5 |
| | | where jg.is_deleted = 0 and br.city_code = #{region.cityCode} |
| | | where jg.is_deleted = 0 and jg.community_code like concat(#{region.cityCode},'%') |
| | | <if test="isAdministrator==2"> |
| | | <choose> |
| | | <when test="regionChildCodesList !=null and regionChildCodesList.size()>0"> |
| | | and jg.community_code in |
| | | <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | and 1=1 |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | union all |
| | | </if> |
| | | SELECT |
| | |
| | | sort |
| | | FROM blade_region |
| | | where 1=1 |
| | | and district_code = '361102' |
| | | and district_code like concat(#{region.districtCode},'%') |
| | | <if test="region.parentCode!=null and region.parentCode!=''"> |
| | | and parent_code = #{region.parentCode} |
| | | </if> |