Compare commits

...

2 Commits

Author SHA1 Message Date
00551ec8fe Merge pull request '秒杀列表改回获取全部商品' (#43) from cxw into master
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #43
2024-10-14 18:45:01 +08:00
0da862a180 秒杀列表改回获取全部商品 2024-10-14 18:20:13 +08:00

View File

@ -130,16 +130,19 @@ public class AppSeckillActivityController {
@GetMapping("/spuList") @GetMapping("/spuList")
@Parameter(name = "count", description = "需要展示的数量", example = "6") @Parameter(name = "count", description = "需要展示的数量", example = "6")
@Operation(summary = "获得现在进行的秒杀活动分页") @Operation(summary = "获得秒杀活动分页")
public CommonResult<List<ProductSpuRespDTO>> getSeckillActivitySupList(@RequestParam(name = "count", defaultValue = "3") Integer count) { public CommonResult<List<ProductSpuRespDTO>> getSeckillActivitySupList(@RequestParam(name = "count", defaultValue = "3") Integer count) {
AppSeckillActivityPageReqVO pageReqVO = new AppSeckillActivityPageReqVO(); AppSeckillActivityPageReqVO pageReqVO = new AppSeckillActivityPageReqVO();
Page<SeckillActivityDO> page = new Page<>(1, 3);
;
if (count != null && count != 0) { if (count != null && count != 0) {
page = new Page<>(1, count); pageReqVO.setPageNo(1);
pageReqVO.setPageSize(count);
} }
// Page<SeckillActivityDO> page = new Page<>(1, 3);
// if (count != null && count != 0) {
// page = new Page<>(1, count);
// }
// 先找出当前时间对应的配置时间段id // 先找出当前时间对应的配置时间段id
List<Long> configIdList = new ArrayList<>(); /* List<Long> configIdList = new ArrayList<>();
try { try {
List<SeckillConfigDO> timeList = configService.getSeckillConfigListByStatus(CommonStatusEnum.ENABLE.getStatus()); List<SeckillConfigDO> timeList = configService.getSeckillConfigListByStatus(CommonStatusEnum.ENABLE.getStatus());
SimpleDateFormat format = new SimpleDateFormat("HH:mm"); SimpleDateFormat format = new SimpleDateFormat("HH:mm");
@ -159,9 +162,9 @@ public class AppSeckillActivityController {
return success(null); return success(null);
} }
// 获取满足当前正在进行的活动 // 获取满足当前正在进行的活动
PageResult<SeckillActivityDO> pageResult = activityService.getRunningActivityByConfigIdsCount(configIdList, page); PageResult<SeckillActivityDO> pageResult = activityService.getRunningActivityByConfigIdsCount(configIdList, page);*/
// 1. 查询满足当前阶段的活动 // 1. 查询满足当前阶段的活动
// PageResult<SeckillActivityDO> pageResult = activityService.getSeckillActivityAppPageByConfigId(pageReqVO); PageResult<SeckillActivityDO> pageResult = activityService.getSeckillActivityAppPageByConfigId(pageReqVO);
if (CollUtil.isEmpty(pageResult.getList())) { if (CollUtil.isEmpty(pageResult.getList())) {
return success(null); return success(null);
} }