From d1884d813f7085c705d36c1142e42f77d7c57f32 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Sun, 2 Aug 2026 13:28:21 +0800 Subject: [PATCH] 11 --- .../mapper/order/HardAfterSaleCarMapper.xml | 42 ++++++++++--------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/pjcloud-hardware/pjcloud-hardware-biz/src/main/resources/mapper/order/HardAfterSaleCarMapper.xml b/pjcloud-hardware/pjcloud-hardware-biz/src/main/resources/mapper/order/HardAfterSaleCarMapper.xml index 4859c1a72..a23cd4849 100644 --- a/pjcloud-hardware/pjcloud-hardware-biz/src/main/resources/mapper/order/HardAfterSaleCarMapper.xml +++ b/pjcloud-hardware/pjcloud-hardware-biz/src/main/resources/mapper/order/HardAfterSaleCarMapper.xml @@ -35,29 +35,31 @@ - + SELECT + MIN(a.id) AS id, + MIN(a.refund_id) AS refund_id, + MIN(a.parent_car_id) AS parent_car_id, a.product_id, - a.product_name, - a.product_pic, - a.product_nature, - a.product_price, - sum(a.product_count) as productCount, - sum(a.product_weight) as productWeight, - sum(a.total_price) as totalPrice, - a.create_by, - a.create_time, - a.update_by, - a.update_time, - a.del_flag, - a.tenant_id - from hard_after_sale_car a + MIN(a.product_name) AS product_name, + MIN(a.product_pic) AS product_pic, + MIN(a.product_nature) AS product_nature, + MIN(a.product_price) AS product_price, + SUM(a.product_count) AS product_count, + SUM(a.product_weight) AS product_weight, + SUM(a.total_price) AS total_price, + MIN(a.create_by) AS create_by, + MIN(a.create_time) AS create_time, + MIN(a.update_by) AS update_by, + MIN(a.update_time) AS update_time, + MIN(a.del_flag) AS del_flag, + MIN(a.tenant_id) AS tenant_id + FROM hard_after_sale_car a a.del_flag = '0' - and a.parent_car_id = #{carParentId} + AND a.parent_car_id = #{carParentId} - group by a.product_id + GROUP BY a.product_id \ No newline at end of file