From cac79ebfa9c75a048575baf572cf4f25b5a3dbc9 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: Tue, 16 Jan 2024 13:30:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=95=86=E5=93=81=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/CardFavorableServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) 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 49e774657..ec02bdb8c 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 @@ -1,5 +1,6 @@ package com.fuint.business.marketingActivity.cardFavorable.service.impl; +import cn.hutool.core.date.DateUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -23,6 +24,7 @@ import javax.annotation.Resource; import java.io.Serializable; import java.util.Arrays; import java.util.List; +import java.util.stream.Collectors; /** * (CardFavorable)表服务实现类 @@ -183,6 +185,10 @@ public class CardFavorableServiceImpl extends ServiceImpl couponVOS = cardFavorableRecordMapper.selectAllByCondition(page,cardFavorableDTOS); + List records = couponVOS.getRecords(); + //有效期 + List collect = records.stream().filter(s -> s.getEndTime().getTime() > System.currentTimeMillis()).collect(Collectors.toList()); + couponVOS.setRecords(collect); return couponVOS; } }