diff --git a/dl-module-base/src/main/resources/mapper/car/AppCarMainMapper.xml b/dl-module-base/src/main/resources/mapper/car/AppCarMainMapper.xml index 9ecbb1a6..f9aa9664 100644 --- a/dl-module-base/src/main/resources/mapper/car/AppCarMainMapper.xml +++ b/dl-module-base/src/main/resources/mapper/car/AppCarMainMapper.xml @@ -3,13 +3,19 @@ - - select main.* from base_customer_car car INNER JOIN base_car_main main on car.car_id = main.id - where car.cus_id = ( - select id from base_customer_main - where user_id = #{userId} - and deleted = 0 - ) and main.deleted = 0 + SELECT main.*, brand.brand_name as brandName, brand.logo_img as logoImg + from (select main.* + from base_customer_car car + INNER JOIN base_car_main main on car.car_id = main.id + where car.cus_id = ( + select id + from base_customer_main + where user_id = #{userId} + and deleted = 0 + ) + and main.deleted = 0) as main + LEFT JOIN base_car_brand brand on main.car_brand = brand.id \ No newline at end of file