liujie
3 天以前 cbc307682c0ca48d59e7b539d6a2ae58d49cabe1
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>