| | |
| | | </if> |
| | | </select> |
| | | |
| | | <!--查询小区集合--> |
| | | <select id="getAoiList" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity"> |
| | | select nei_code,aoi_code,ifnull(aoi_name,sub_aoi) as aoi_name,x,y,address_name from jczz_doorplate_address |
| | | where 1=1 |
| | | <choose> |
| | | <when test="list != null and list.size()>0"> |
| | | and id in |
| | | <foreach collection="list" item="id" separator ="," open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | and id in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </select> |
| | | |
| | | <!--查询所有的地址表id集合--> |
| | | <select id="getAoiCodeList" resultType="java.lang.Long"> |
| | | select |
| | | max(id) |
| | | from jczz_doorplate_address |
| | | where aoi_code != "" and aoi_name !="" |
| | | GROUP BY aoi_code |
| | | union all |
| | | ( |
| | | select |
| | | max(id) |
| | | from jczz_doorplate_address |
| | | where aoi_code != "" and sub_aoi != "" |
| | | group by aoi_code |
| | | ) |
| | | </select> |
| | | </mapper> |