From e65c175ef6e549424a67ed0c37639dd583e59b8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Thu, 14 Mar 2024 16:00:44 +0800 Subject: [PATCH] bug --- .../service/impl/ActiveExchangeServiceImpl.java | 9 ++++++--- .../mapper/xml/CardFavorableRecordMapper.xml | 1 + .../cardFavorable/vo/CardFavorableRecordVO.java | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java index 78c052b2b..96181349e 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeExchange/service/impl/ActiveExchangeServiceImpl.java @@ -634,9 +634,12 @@ public class ActiveExchangeServiceImpl implements ActiveExchangeService { cardFavorableRecordVOS.add(cardFavorableRecordVO); } if (StringUtils.isNotEmpty(cardFavorableRecordVO.getExclusiveFunction()) && cardFavorableRecordVO.getExclusiveFunction().equals("2")) { - // paymentActiveDTO.getMtUserLevel() - - cardFavorableRecordVOS.add(cardFavorableRecordVO); + String membershipLevel = cardFavorableRecordVO.getMembershipLevel(); + for (String s : membershipLevel.split(",")) { + if (paymentActiveDTO.getMtUserLevel().equals(s)){ + cardFavorableRecordVOS.add(cardFavorableRecordVO); + } + } } } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/mapper/xml/CardFavorableRecordMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/mapper/xml/CardFavorableRecordMapper.xml index ff120301f..8dee6baf5 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/mapper/xml/CardFavorableRecordMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/mapper/xml/CardFavorableRecordMapper.xml @@ -163,6 +163,7 @@ cf.oil_type oilType, cf.satisfied_amount satisfiedAmount, cf.exclusive_function exclusiveFunction, + cf.membership_level membershipLevel (case discount_type when'1'then cf.satisfied_amount * (1-(cf.special_discount * ${paymentActiveDTO.amount})) when '0' then cf.discount_amount end) as amount diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/vo/CardFavorableRecordVO.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/vo/CardFavorableRecordVO.java index 18554af80..ac2635e2d 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/vo/CardFavorableRecordVO.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/vo/CardFavorableRecordVO.java @@ -35,6 +35,7 @@ public class CardFavorableRecordVO extends CardFavorableRecord { * 互斥功能 0:满减活动 1:储值卡付款 */ private String exclusiveFunction; + private String membershipLevel; /** * 可用油品 */