From 8a2bf03a20319c1aacfa535eb130006c0f0c3a52 Mon Sep 17 00:00:00 2001 From: zhaotianfeng <12345678> Date: Tue, 24 Sep 2024 20:05:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/car/AppCarMainMapper.xml | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) 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