<?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.muyu.enterprise.mapper.car.MessageValueMapper">

    <select id="getTemplateId" resultType="java.lang.Long">
        SELECT
            t.message_template_id
        FROM
            vehicle v
                LEFT JOIN vehicle_type t ON v.vehicle_type_id = t.vehicle_type_id
        WHERE
            v.vehicle_vin = #{vehicleVin}
    </select>

    <select id="getTemplateList" resultType="com.muyu.enterprise.domain.resp.car.MessageValueListResp">
        SELECT
            *
        FROM
            message_value m
        WHERE
            m.template_id = #{templateId}
    </select>
</mapper>
