diff --git a/fuintAdmin/src/views/EventMarketing/storeOilBlock/index.vue b/fuintAdmin/src/views/EventMarketing/storeOilBlock/index.vue index 833151cb5..7b1e4cd5a 100644 --- a/fuintAdmin/src/views/EventMarketing/storeOilBlock/index.vue +++ b/fuintAdmin/src/views/EventMarketing/storeOilBlock/index.vue @@ -167,9 +167,9 @@ + :value="dict.id.toString()"> diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml index ee623ae3e..9390a2698 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/mapper/xml/OilOrderMapper.xml @@ -362,6 +362,7 @@ FROM active_discount ad LEFT JOIN active_discount_child adc ON ad.id = adc.active_discount_id + left join active_discount_records adr on adr.active_discount_id = ad.id WHERE ad.store_id = #{storeId} AND adc.amount #{amount} @@ -370,6 +371,7 @@ AND ad.STATUS = 0 AND concat(',',ad.adapt_oil,',') like concat('%',#{oilId},'%') AND concat(',',ad.diesel_user_level,',') like concat('%',#{levelId},'%') + HAVING sum(adr.id) limitAcount GROUP BY ad.id @@ -385,6 +387,7 @@ FROM active_fullminus af LEFT JOIN active_discount_child adc ON af.id = adc.active_fullminus_id + left join active_fullminus_records afr on afr.active_fullminus_id = ad.id WHERE af.store_id = #{storeId} AND adc.amount #{amount} @@ -393,6 +396,7 @@ AND af.STATUS = 0 AND concat(',',af.adapt_oil,',') like concat('%',#{oilId},'%') AND concat(',',af.diesel_user_level,',') like concat('%',#{levelId},'%') + HAVING sum(afr.id) limitAcount GROUP BY af.id