<?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="org.dromara.system.mapper.TblDzbcDriverTripMapper">

    <resultMap type="org.dromara.system.domain.vo.TblDzbcDriverTripVo" id="TblDzbcDriverTripResult">
        <result property="id" column="id"/>
        <result property="tripNo" column="trip_no"/>
        <result property="pathId" column="path_id"/>
        <result property="pathName" column="path_name"/>
        <result property="driverId" column="driver_id"/>
        <result property="driverName" column="driver_name"/>
        <result property="driverPhone" column="driver_phone"/>
        <result property="carId" column="car_id"/>
        <result property="carPlate" column="car_plate"/>
        <result property="startTime" column="start_time"/>
        <result property="endTime" column="end_time"/>
        <result property="status" column="status"/>
        <result property="qrCode" column="qr_code"/>
        <result property="currentSiteId" column="current_site_id"/>
        <result property="currentSiteName" column="current_site_name"/>
        <result property="cargoCount" column="cargo_count"/>
        <result property="cargoTotalPrice" column="cargo_total_price"/>
        <result property="remark" column="remark"/>
        <result property="ext1" column="ext1"/>
        <result property="ext2" column="ext2"/>
    </resultMap>

    <sql id="selectTblDzbcDriverTripVo">
        select id, trip_no, path_id, path_name, driver_id, driver_name, driver_phone, car_id, car_plate, start_time, end_time, status, qr_code, current_site_id, current_site_name, cargo_count, cargo_total_price, remark, ext1, ext2
        from tbl_dzbc_driver_trip
    </sql>

    <select id="selectByTripNo" parameterType="String" resultMap="TblDzbcDriverTripResult">
        <include refid="selectTblDzbcDriverTripVo"/>
        where trip_no = #{tripNo}
    </select>

</mapper>
