Pu Zhibing
6 天以前 2fde2e99c38e8c46f7f7988fce076cc7d16445e4
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/CarMapper.xml
@@ -23,7 +23,9 @@
        <result column="addType" property="addType"/>
        <result column="addObjectId" property="addObjectId"/>
    </resultMap>
    <update id="updateUseState">
            update t_car set useDriverId = null where useDriverId  = #{uid}
    </update>
    <select id="queryIdleData" resultType="map">
@@ -68,4 +70,14 @@
        addObjectId as addObjectId
        from t_car where state = 1 and carLicensePlate = #{licensePlate}
    </select>
    <select id="queryIdleDataFromId" resultType="java.util.Map">
        select
            a.id as id,
            CONCAT(a.carLicensePlate, '-',c.`name`, b.`name`, ' ', a.carColor) as name,
            a.useDriverId as useDriverId
        from t_car a
                 left join t_car_model b on (a.carModelId = b.id)
                 left join t_car_brand c on (b.brandId = c.id)
        where a.state = 1 and find_in_set(#{id},a.bindDriverId)
    </select>
</mapper>