初始化秒杀活动

This commit is contained in:
lifenlong
2021-06-13 16:27:40 +08:00
parent a159c0d0db
commit 10dbed04b6
6 changed files with 32 additions and 35 deletions

View File

@@ -35,15 +35,10 @@ public class SeckillManagerController {
private SeckillApplyService seckillApplyService;
@ApiOperation(value = "添加秒杀活动")
@PostMapping
public ResultMessage<Seckill> addSeckill(SeckillVO seckillVO) {
AuthUser currentUser = UserContext.getCurrentUser();
seckillVO.setStoreId(currentUser.getId());
seckillVO.setStoreName(currentUser.getUsername());
seckillVO.setSeckillApplyStatus(SeckillApplyStatusEnum.NOT_APPLY.name());
seckillService.saveSeckill(seckillVO);
return ResultUtil.data(seckillVO);
@ApiOperation(value = "添加秒杀活动(初始化方法默认初始化30天内的活动")
@GetMapping
public void addSeckill() {
seckillService.init();
}