mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.panzhihua.service_grid.dao.EventSpecialCrowdRecordMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.panzhihua.service_grid.model.dos.EventSpecialCrowdRecordDO">
        <id column="id" property="id" />
        <result column="event_id" property="eventId" />
        <result column="population_id" property="populationId" />
        <result column="create_at" property="createAt" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, event_id, population_id, create_at
    </sql>
 
    <select id="getSpecialPopulationIds" resultType="com.panzhihua.common.model.vos.grid.EventSpecialPopulationDetailsVO" parameterType="Long">
        SELECT
            escr.id,
            cmp.`name`,
            cmp.phone,
            cmp.card_no AS idCard,
            cmpct.label,
            cmp.address,
            cmp.nation,
            cmp.political_outlook
        FROM
            event_special_crowd_record AS escr
            LEFT JOIN com_mng_population AS cmp ON cmp.id = escr.population_id
            left join com_mng_population_community_tags as cmpct on cmpct.population_id = cmp.id
        WHERE
            escr.event_id = #{eventId}
    </select>
 
</mapper>