Compare commits

...

6 Commits

6 changed files with 10 additions and 5 deletions

View File

@ -116,7 +116,7 @@ public class AppSeckillActivityController {
@Operation(summary = "获得秒杀活动分页")
public CommonResult<List<ProductSpuRespDTO>> getSeckillActivitySupList(@RequestParam(name = "count", defaultValue = "6") Integer count) {
AppSeckillActivityPageReqVO pageReqVO = new AppSeckillActivityPageReqVO();
if (count == null || count == 0){
if (count != null && count != 0){
pageReqVO.setPageNo(1);
pageReqVO.setPageSize(count);
}

View File

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

View File

@ -72,6 +72,7 @@ public interface SeckillActivityMapper extends BaseMapperX<SeckillActivityDO> {
default PageResult<SeckillActivityDO> selectPage(AppSeckillActivityPageReqVO pageReqVO, Integer status) {
return selectPage(pageReqVO, new LambdaQueryWrapperX<SeckillActivityDO>()
.eqIfPresent(SeckillActivityDO::getStatus, status)
.ge(SeckillActivityDO::getEndTime, LocalDateTime.now())
// TODO 芋艿 find in set 的想法
.apply(ObjectUtil.isNotNull(pageReqVO.getConfigId()), "FIND_IN_SET(" + pageReqVO.getConfigId() + ",config_ids) > 0"));
}

View File

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

View File

@ -44,7 +44,7 @@ public class MemberUserPageReqVO extends PageParam {
@Schema(description = "权益id", example = "1")
private Long noticeInterestId;
@Schema(description = "是否绑过", example = "1")
@Schema(description = "是否激活", example = "1")
private Integer activate;
// TODO 芋艿注册用户类型

View File

@ -52,4 +52,6 @@ public class MemberUserRespVO extends MemberUserBaseVO {
@Schema(description = "用户经验值", requiredMode = Schema.RequiredMode.REQUIRED, example = "200")
private Integer experience;
@Schema(description = "是否激活卡", example = "1")
private Integer activate;
}