小程序拼团活动接口过滤已过期的

This commit is contained in:
XinWei 2024-10-09 16:22:45 +08:00
parent 827563ce06
commit 2a93813e68
2 changed files with 5 additions and 3 deletions

View File

@ -36,12 +36,14 @@ public interface CombinationActivityMapper extends BaseMapperX<CombinationActivi
default PageResult<CombinationActivityDO> selectPage(PageParam pageParam, Integer status) { default PageResult<CombinationActivityDO> selectPage(PageParam pageParam, Integer status) {
return selectPage(pageParam, new LambdaQueryWrapperX<CombinationActivityDO>() return selectPage(pageParam, new LambdaQueryWrapperX<CombinationActivityDO>()
.eq(CombinationActivityDO::getStatus, status)); .eq(CombinationActivityDO::getStatus, status)
.ge(CombinationActivityDO::getEndTime, LocalDateTime.now()));
} }
default List<CombinationActivityDO> selectListByStatus(Integer status, Integer count) { default List<CombinationActivityDO> selectListByStatus(Integer status, Integer count) {
return selectList(new LambdaQueryWrapperX<CombinationActivityDO>() return selectList(new LambdaQueryWrapperX<CombinationActivityDO>()
.eq(CombinationActivityDO::getStatus, status) .eq(CombinationActivityDO::getStatus, status)
.ge(CombinationActivityDO::getEndTime, LocalDateTime.now())
.last("LIMIT " + count)); .last("LIMIT " + count));
} }

View File

@ -101,7 +101,7 @@ public interface CombinationActivityService {
List<CombinationActivityDO> getCombinationActivityListByIds(Collection<Long> ids); List<CombinationActivityDO> getCombinationActivityListByIds(Collection<Long> ids);
/** /**
* 获取正在进行的活动分页数据 * 获取正在进行的活动分页数据同时活动未过期
* *
* @param count 需要的数量 * @param count 需要的数量
* @return 拼团活动分页 * @return 拼团活动分页
@ -109,7 +109,7 @@ public interface CombinationActivityService {
List<CombinationActivityDO> getCombinationActivityListByCount(Integer count); List<CombinationActivityDO> getCombinationActivityListByCount(Integer count);
/** /**
* 获取正在进行的活动分页数据 * 获取正在进行的活动分页数据同时活动未过期
* *
* @param pageParam 分页请求 * @param pageParam 分页请求
* @return 拼团活动分页 * @return 拼团活动分页