This commit is contained in:
齐天大圣 2024-01-19 10:27:49 +08:00
parent de97c7d2fd
commit 1774597789

View File

@ -354,8 +354,8 @@
ad.adapt_oil oilId,
ad.limit_acount as limitAcount,
ad.participation_condition,
(case ad.store_id when ${storeId} then adc.amount * (1-(adc.discount * 0.1))
end) as discount
max((case ad.store_id when ${storeId} then adc.amount * (1-(adc.discount * 0.1))
end)) as discount
FROM
active_discount ad
LEFT JOIN active_discount_child adc ON ad.id = adc.active_discount_id
@ -378,7 +378,7 @@
af.adapt_oil oilId,
af.limit_acount as limitAcount,
af.participation_condition,
adc.deduction_amount discount
max(adc.deduction_amount) discount
FROM
active_fullminus af
LEFT JOIN active_discount_child adc ON af.id = adc.active_fullminus_id