过滤商品券
This commit is contained in:
parent
19f9249252
commit
cac79ebfa9
@ -1,5 +1,6 @@
|
|||||||
package com.fuint.business.marketingActivity.cardFavorable.service.impl;
|
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.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@ -23,6 +24,7 @@ import javax.annotation.Resource;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (CardFavorable)表服务实现类
|
* (CardFavorable)表服务实现类
|
||||||
@ -183,6 +185,10 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
|
|||||||
Integer id = nowAccountInfo.getId();
|
Integer id = nowAccountInfo.getId();
|
||||||
cardFavorableDTOS.setId(id);
|
cardFavorableDTOS.setId(id);
|
||||||
IPage<CouponVO> couponVOS = cardFavorableRecordMapper.selectAllByCondition(page,cardFavorableDTOS);
|
IPage<CouponVO> couponVOS = cardFavorableRecordMapper.selectAllByCondition(page,cardFavorableDTOS);
|
||||||
|
List<CouponVO> records = couponVOS.getRecords();
|
||||||
|
//有效期
|
||||||
|
List<CouponVO> collect = records.stream().filter(s -> s.getEndTime().getTime() > System.currentTimeMillis()).collect(Collectors.toList());
|
||||||
|
couponVOS.setRecords(collect);
|
||||||
return couponVOS;
|
return couponVOS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user