11
This commit is contained in:
1 parent
295077a1e8
commit
d1884d813f
1 file changed
+22
-20
+22
-20
@@ -35,29 +35,31 @@
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="getByCarPrentId" resultType="com.bsd.pjcloud.hard.api.entity.order.HardAfterSaleCarEntity">
|
||||
select a.id,
|
||||
a.refund_id,
|
||||
a.parent_car_id,
|
||||
<select id="getByCarPrentId"
|
||||
resultType="com.bsd.pjcloud.hard.api.entity.order.HardAfterSaleCarEntity">
|
||||
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
|
||||
<where>
|
||||
a.del_flag = '0'
|
||||
and a.parent_car_id = #{carParentId}
|
||||
AND a.parent_car_id = #{carParentId}
|
||||
</where>
|
||||
group by a.product_id
|
||||
GROUP BY a.product_id
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in new issue
Block a user