秒杀和拼团列表过滤已过期活动 #39

Merged
root merged 5 commits from cxw into master 2024-10-09 18:26:34 +08:00
2 changed files with 5 additions and 3 deletions
Showing only changes of commit 2a93813e68 - Show all commits

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 拼团活动分页