| | |
| | | sort |
| | | FROM blade_region |
| | | where 1=1 |
| | | and district_code like concat(#{region.districtCode},'%') |
| | | <if test="region.districtCode!=null and region.districtCode!=''"> |
| | | and district_code like concat(#{region.districtCode},'%') |
| | | </if> |
| | | <if test="region.parentCode!=null and region.parentCode!=''"> |
| | | and parent_code = #{region.parentCode} |
| | | </if> |
| | |
| | | |
| | | <!--查询公安相关的区域数据--> |
| | | <select id="getPoliceList" resultType="org.springblade.modules.system.entity.Region"> |
| | | SELECT id as code,parentId as parent_code,name,'' as ancestors,null as region_level,1 as sort FROM police_region |
| | | SELECT id as code,parent_id as parent_code,name,'' as ancestors,null as region_level,1 as sort FROM v_police_region |
| | | where 1=1 |
| | | <if test="communityCode!=null and communityCode!=''"> |
| | | and id like concat('%',#{communityCode},'%') |