<?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.tofly.gpsboot.mapper.car.CarFilemmMapper">

    <resultMap id="carFilemmMap" type="com.tofly.pojo.car.CarFilemm">
        <id property="id" column="ID"/>
        <result property="carId" column="CAR_ID"/>
        <result property="buyTime" column="BUY_TIME"/>
        <result property="carModel" column="CAR_MODEL"/>
        <result property="engineNm" column="ENGINE_NM"/>
        <result property="frameNm" column="FRAME_NM"/>
        <result property="carTool" column="CAR_TOOL"/>
        <result property="createUser" column="CREATE_USER"/>
        <result property="carPermit" column="CAR_PERMIT"/>
        <result property="delFlag" column="DEL_FLAG"/>
        <result property="taxationNm" column="TAXATION_NM"/>
        <result property="createDate" column="CREATE_DATE"/>
        <association property="carNumber" column="CAR_ID" select="getcarNumber"></association>
        <association property="createUserName" column="CREATE_USER"
                     select="com.tofly.gpsboot.mapper.plan.HydrantrecordMapper.getRealName"></association>
    </resultMap>


    <select id="getcarNumber" resultType="java.lang.Object">
      select CAR_NUMBER as carNumber from tf_car_baseinfo where id = #{carId}
    </select>

</mapper>
