manailin
2021-11-03 c3811d01d1929a98a0f34f70ca187d82ee312dbb
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml
@@ -242,8 +242,9 @@
        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 != &quot;&quot;' >
            AND (cmp.`name` LIKE concat (#{populationListDTO.keyWord},'%') or cmp.card_no_str like concat (#{populationListDTO.keyWord},'%'))
        </if>
@@ -373,6 +374,36 @@
            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 != &quot;&quot;'>
            AND cmp.`name` LIKE concat(#{pageInputUserDTO.name},'%')
        </if>
        <if test='pageInputUserDTO.areaName != null and pageInputUserDTO.areaName != &quot;&quot;'>
            AND cmv.`alley` LIKE concat(#{pageInputUserDTO.areaName},'%')
        </if>
        <if test='pageInputUserDTO.tags != null and pageInputUserDTO.tags != &quot;&quot;'>
            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>