<?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.car.gateway.mapper.CarOneClickOperationMapper">


    <insert id="addConnect">
        insert into car_one_click_operation
            (vin, user_name, password)
        values (#{vehicleVin}, #{username}, #{password})
    </insert>
    <select id="selectByVehicleVin" resultType="java.lang.String">
        select vin
        from car_one_click_operation
        where vin = #{vehicleVin}
    </select>
    <select id="getMqttServerModel" resultType="com.muyu.car.gateway.domain.VehicleConnection">
        select vin vehicleVin,
               user_name,
               password
        from car_one_click_operation
        where vin = #{vehicleVin}
    </select>


</mapper>
