| | |
| | | com_mng_population AS cmp |
| | | LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmp.village_id |
| | | LEFT JOIN com_mng_population_community_tags AS cmpct ON cmp.id = cmpct.population_id |
| | | LEFT JOIN event_grid_data as egd on egd.grid_community_id = cmpct.community_id |
| | | WHERE |
| | | cmpct.community_id = #{populationListDTO.communityId} |
| | | egd.id = #{populationListDTO.gridId} |
| | | <if test = 'populationListDTO.keyWord != null and populationListDTO.keyWord != ""' > |
| | | AND (cmp.`name` LIKE concat (#{populationListDTO.keyWord},'%') or cmp.card_no_str like concat (#{populationListDTO.keyWord},'%')) |
| | | </if> |
| | |
| | | cmp.create_at DESC |
| | | </select> |
| | | |
| | | <select id="specialInputUserExport" resultType="com.panzhihua.common.model.vos.user.InputUserInfoVO"> |
| | | SELECT |
| | | cmp.id, |
| | | cmv.`name` AS areaName, |
| | | cmv.alley AS alley, |
| | | cmv.house_num AS houseNum, |
| | | cmp.`name`, |
| | | cmp.phone, |
| | | cmpct.label AS tags, |
| | | cmp.create_at |
| | | FROM |
| | | com_mng_population_community_tags as cmpct |
| | | LEFT JOIN com_mng_population AS cmp ON cmp.id = cmpct.population_id |
| | | LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmp.village_id |
| | | WHERE |
| | | cmpct.community_id = #{pageInputUserDTO.communityId} |
| | | AND cmpct.label IS NOT NULL |
| | | <if test='pageInputUserDTO.name != null and pageInputUserDTO.name != ""'> |
| | | AND cmp.`name` LIKE concat(#{pageInputUserDTO.name},'%') |
| | | </if> |
| | | <if test='pageInputUserDTO.areaName != null and pageInputUserDTO.areaName != ""'> |
| | | AND cmv.`alley` LIKE concat(#{pageInputUserDTO.areaName},'%') |
| | | </if> |
| | | <if test='pageInputUserDTO.tags != null and pageInputUserDTO.tags != ""'> |
| | | AND cmpct.label like concat('%',#{pageInputUserDTO.tags},'%') |
| | | </if> |
| | | ORDER BY |
| | | cmp.create_at DESC |
| | | </select> |
| | | |
| | | <select id="query" resultType="com.panzhihua.common.model.vos.community.ComMngPopulationNoSecretVO"> |
| | | select * from com_mng_population |
| | | <where> |