Merge pull request '秒杀和拼团列表过滤已过期活动' (#39) from cxw into master
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #39
This commit is contained in:
commit
9ba1fe2fdd
@ -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);
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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"));
|
||||
}
|
||||
|
@ -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 拼团活动分页
|
||||
|
@ -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 芋艿:注册用户类型;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user