From 59065d2c0000a2cb81119f35e4655c529ec3b66f 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: Sun, 28 Apr 2024 12:04:22 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/xml/CardFavorableRecordMapper.xml | 21 ++++++-------------
.../impl/CardFavorableServiceImpl.java | 7 ++++++-
2 files changed, 12 insertions(+), 16 deletions(-)
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 f10ee266f..5beddcafe 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
@@ -106,12 +106,7 @@
LEFT JOIN card_favorable_record cfr ON cf.id = cfr.card_favorable_id
WHERE
cfr.mt_user_id = #{cardFavorableDTOS.id}
-
and cfr.status = #{cardFavorableDTOS.useStatus}
-
-
- and cfr.status = #{cardFavorableDTOS.useStatus}
-
and cfr.store_id = #{cardFavorableDTOS.storeId}
and cf.type != 1 UNION ALL
SELECT
@@ -123,11 +118,12 @@
LEFT JOIN card_exchange ce ON cer.card_exchange_id = ce.id
WHERE
cer.mt_user_id = #{cardFavorableDTOS.id}
+
+ and cer.status = #{cardFavorableDTOS.useStatus}
+
+ and cer.store_id = #{cardFavorableDTOS.storeId}
and ce.type = 0 or cer.mt_user_id = #{cardFavorableDTOS.id} and ce.type = 1
-
- and cer.status = #{cardFavorableDTOS.useStatus}
-
-
+
and cer.status = #{cardFavorableDTOS.useStatus}
and cer.store_id = #{cardFavorableDTOS.storeId} UNION ALL
@@ -141,12 +137,7 @@
WHERE
cer.mt_user_id = #{cardFavorableDTOS.id}
and ce.type = 1
-
- and cer.status = #{cardFavorableDTOS.useStatus}
-
-
- and cer.status = #{cardFavorableDTOS.useStatus}
-
+ and cer.status = #{cardFavorableDTOS.useStatus}
and cer.store_id = #{cardFavorableDTOS.storeId}
and cer.status = #{cardFavorableDTOS.useStatus}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableServiceImpl.java
index 72a06805f..381e34ecf 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableServiceImpl.java
@@ -326,7 +326,7 @@ public class CardFavorableServiceImpl extends ServiceImpl couponVOS = cardFavorableRecordMapper.selectAllByCondition(page,cardFavorableDTOS);
List records = couponVOS.getRecords();
+ for (CouponVO record : records) {
+ if (record.getCouponType().equals("兑换券")){
+ record.setCouponContent(record.getSatisfiedAmount());
+ }
+ }
//有效期
List collect = records.stream().filter(s -> s.getEndTime().getTime() < System.currentTimeMillis()).collect(Collectors.toList());
if (ObjectUtils.isNotEmpty(collect)){