diff --git a/fuintAdmin/src/views/EventMarketing/yijiancoupon/index.vue b/fuintAdmin/src/views/EventMarketing/yijiancoupon/index.vue index 6521f16fe..63029d650 100644 --- a/fuintAdmin/src/views/EventMarketing/yijiancoupon/index.vue +++ b/fuintAdmin/src/views/EventMarketing/yijiancoupon/index.vue @@ -630,7 +630,7 @@ export default { this.opendetails = true let data = { id:row.id, - exchangeFrom:"店铺一键送券!" + exchangeFrom:"店铺一键送券" } await looklook(data).then(res=>{ if(res.data){ diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/ActiveConsumptionChildService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/ActiveConsumptionChildService.java index 24c5abe2c..53627efc5 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/ActiveConsumptionChildService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/ActiveConsumptionChildService.java @@ -20,7 +20,7 @@ public interface ActiveConsumptionChildService extends IService selectList(Serializable id); - List detailRecord(ActiveConsumption activeConsumption); + List detailRecord(ActiveConsumption activeConsumption); CardFavorableCountVO detailCount(Serializable id); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionChildServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionChildServiceImpl.java index 6071a4b68..b49e048f0 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionChildServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeConsumption/service/impl/ActiveConsumptionChildServiceImpl.java @@ -18,6 +18,8 @@ import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; /** @@ -41,19 +43,45 @@ public class ActiveConsumptionChildServiceImpl extends ServiceImpl detailRecord(ActiveConsumption activeConsumption) { + public List detailRecord(ActiveConsumption activeConsumption) { + + ArrayList objects = new ArrayList<>(); // 查询优惠券领取记录 AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(CardFavorableRecord::getActiveId, activeConsumption.getId()); - queryWrapper.eq(CardFavorableRecord::getExchangeFrom, activeConsumption.getExchangeFrom()); - queryWrapper.eq(CardFavorableRecord::getStoreId, nowAccountInfo.getStoreId()); + queryWrapper.like(CardFavorableRecord::getExchangeFrom, activeConsumption.getExchangeFrom()); if (ObjectUtils.isNotEmpty(activeConsumption.getActiveStartTime()) && ObjectUtils.isNotEmpty(activeConsumption.getActiveEndTime())){ queryWrapper.between(CardFavorableRecord::getCreateTime, activeConsumption.getActiveStartTime(), activeConsumption.getActiveEndTime()); } queryWrapper.eq(CardFavorableRecord::getStoreId, nowAccountInfo.getStoreId()); List favorableRecords = cardFavorableRecordService.list(queryWrapper); - return favorableRecords; + + for (CardFavorableRecord favorableRecord : favorableRecords) { + HashMap objectObjectHashMap = new HashMap<>(); + objectObjectHashMap.put("name",favorableRecord.getName()); + objectObjectHashMap.put("mobile",favorableRecord.getMobile()); + objectObjectHashMap.put("createTime",favorableRecord.getCreateTime()); + objectObjectHashMap.put("exchangeFrom",favorableRecord.getExchangeFrom()); + objects.add(objectObjectHashMap); + } + LambdaQueryWrapper queryWrapper1 = new LambdaQueryWrapper<>(); + queryWrapper1.eq(CardExchangeRecord::getActiveId, activeConsumption.getId()); + queryWrapper1.like(CardExchangeRecord::getExchangeFrom, activeConsumption.getExchangeFrom()); + if (ObjectUtils.isNotEmpty(activeConsumption.getActiveStartTime()) && ObjectUtils.isNotEmpty(activeConsumption.getActiveEndTime())){ + queryWrapper1.between(CardExchangeRecord::getCreateTime, activeConsumption.getActiveStartTime(), activeConsumption.getActiveEndTime()); + } + queryWrapper1.eq(CardExchangeRecord::getStoreId, nowAccountInfo.getStoreId()); + List record1 = cardExchangeRecordService.list(queryWrapper1); + for (CardExchangeRecord cardExchangeRecord : record1) { + HashMap objectObjectHashMap1 = new HashMap<>(); + objectObjectHashMap1.put("name",cardExchangeRecord.getName()); + objectObjectHashMap1.put("mobile",cardExchangeRecord.getMobile()); + objectObjectHashMap1.put("createTime",cardExchangeRecord.getCreateTime()); + objectObjectHashMap1.put("exchangeFrom",cardExchangeRecord.getExchangeFrom()); + objects.add(objectObjectHashMap1); + } + return objects; } @Override diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeOneCoupon/service/impl/ActiveOneCouponServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeOneCoupon/service/impl/ActiveOneCouponServiceImpl.java index 052bd7d15..297c2dd23 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeOneCoupon/service/impl/ActiveOneCouponServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeOneCoupon/service/impl/ActiveOneCouponServiceImpl.java @@ -159,7 +159,7 @@ public class ActiveOneCouponServiceImpl extends ServiceImpl queryWrapper1 = new LambdaQueryWrapper<>(); - queryWrapper1.eq(CardFavorableRecord::getExchangeFrom, "店铺一键送券!"); + queryWrapper1.eq(CardFavorableRecord::getExchangeFrom, "店铺一键送券"); queryWrapper1.eq(CardFavorableRecord::getActiveId, record.getId()); queryWrapper1.eq(CardFavorableRecord::getStoreId, record.getStoreId()); List list = cardFavorableRecordService.list(queryWrapper1); @@ -170,7 +170,7 @@ public class ActiveOneCouponServiceImpl extends ServiceImpl queryWrapper2 = new LambdaQueryWrapper<>(); - queryWrapper2.eq(CardExchangeRecord::getExchangeFrom, "店铺一键送券!"); + queryWrapper2.eq(CardExchangeRecord::getExchangeFrom, "店铺一键送券"); queryWrapper2.eq(CardExchangeRecord::getActiveId, record.getId()); queryWrapper2.eq(CardExchangeRecord::getStoreId, record.getStoreId()); List list2 = cardExchangeRecordService.list(queryWrapper2); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java index 54ba49359..38bd39531 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java @@ -443,7 +443,7 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl