Pu Zhibing
2024-12-13 73b750200f25df08aa64124da49e7461f9de6653
DriverNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/CarMapper.xml
@@ -46,6 +46,26 @@
    </select>
    <select id="queryIdleData1" resultType="map">
        select
        a.id as id,
        CONCAT(a.carLicensePlate, '-',c.`name`, b.`name`, ' ', a.carColor) as name
        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 a.createBy = #{driverId}
        <choose>
            <when test="companyId != 1">
                and  a.companyId = #{companyId} or a.franchiseeId = #{companyId}
            </when>
            <otherwise>
                and a.isPlatCar = 1
            </otherwise>
        </choose>
    </select>
    <select id="query" resultType="com.stylefeng.guns.modular.system.model.Car">
        select
        id as id,