<?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.xxfc.platform.vehicle.mapper.VehicleUserReserveMapper" >


    <select id="getList"   parameterType="com.xxfc.platform.vehicle.pojo.dto.VehicleUserReserveDTO" resultType="com.xxfc.platform.vehicle.pojo.vo.VehicleUserReserveVo">
        SELECT
        r.id,
        r.user_id as userId,
        r.mode_id as modeId,
        r.`name`,
        r.phone,
        r.start_time as startTime,
        r.end_time as endTime,
        r.addr_province as addrProvince,
        r.province_name as provinceName,
        r.addr_city as addrCity,
        r.city_name as cityName,
        r.company_id as companyId,
        r.crt_time as crtTime,
        r.upd_time as updTime,
        r.`status`,
        m.`name` as modelName
        FROM vehicle_user_reserve r
        LEFT JOIN vehicle_model m  ON r.mode_id=m.id
        <where>
            r.is_del=0
        </where>
        order by r.upd_time desc
    </select>

</mapper>