| | |
| | | WHERE is_deleted = 0 AND pcs_code IS NOT NULL |
| | | </select> |
| | | |
| | | <!--查询当前文章范围对应的社区编号字符串集合--> |
| | | <select id="getAllCommunityNameListString" resultType="java.lang.String"> |
| | | SELECT |
| | | code |
| | | FROM blade_region |
| | | where |
| | | <foreach collection="articleRange.split(',')" item="item" open="(" close=")" separator="OR"> |
| | | ancestors like concat('%',#{item},'%') |
| | | </foreach> |
| | | and region_level = 5 |
| | | union |
| | | ( |
| | | SELECT |
| | | br.code |
| | | FROM jczz_district jd |
| | | left join blade_region br on jd.community_code = br.village_code |
| | | where br.region_level = 5 |
| | | and jd.id in |
| | | <foreach collection="articleRange.split(',')" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | ) |
| | | union |
| | | ( |
| | | SELECT |
| | | jd.id |
| | | FROM jczz_district jd |
| | | where |
| | | jd.id in |
| | | <foreach collection="articleRange.split(',')" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | ) |
| | | </select> |
| | | |
| | | </mapper> |