<?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.tuoheng.admin.mapper.SectionMapper">

    <resultMap type="com.tuoheng.admin.entity.Section" id="SectionResult">
        <result property="id"    column="id"    />
        <result property="tenantId"    column="tenant_id"    />
        <result property="roadId"    column="road_id"    />
        <result property="sectionRange"    column="section_range"    />
        <result property="startLongitude"    column="start_longitude"    />
        <result property="startLatitude"    column="start_latitude"    />
        <result property="endLongitude"    column="end_longitude"    />
        <result property="endLatitude"    column="end_latitude"    />
        <result property="remark"    column="remark"    />
        <result property="createUser"    column="create_user"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateUser"    column="update_user"    />
        <result property="updateTime"    column="update_time"    />
        <result property="mark"    column="mark"    />
    </resultMap>

    <sql id="Base_Column_List">
        id, tenant_id, road_id, section_range, start_longitude, start_latitude, end_longitude, end_latitude, remark, create_user, create_time, update_user, update_time, mark
    </sql>

    <!-- 查找数据 -->
    <select id="getListByMap" parameterType="hashmap" resultMap="SectionResult">
        select <include refid="Base_Column_List"/>
        from th_section
        where tenant_id = #{tenantId} and id in
        <foreach collection="sectionIdList" item="sectionId" separator="," open="(" close=")">
            #{sectionId}
        </foreach>
    </select>


</mapper>