<?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.RoadInformationMapper">

    <resultMap type="com.tuoheng.admin.entity.RoadInformation" id="RoadInformationResult">
        <result property="id"    column="id"    />
        <result property="tenantId"    column="tenant_id"    />
        <result property="name"    column="name"    />
        <result property="code"    column="code"    />
        <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, name, code, 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="RoadInformationResult">
        select <include refid="Base_Column_List"/>
        from th_road
        where mark = 1 and tenant_id = #{tenantId} and id in
        <foreach collection="roadIdList" item="roadId" separator="," open="(" close=")">
            #{roadId}
        </foreach>
    </select>

</mapper>