设置秒杀活动为自动开启
This commit is contained in:
@@ -27,8 +27,8 @@ import org.springframework.web.bind.annotation.*;
|
||||
* @date: 2021/5/21 7:11 下午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "管理端,优惠券接口")
|
||||
@RequestMapping("/manager/promotion/coupon")
|
||||
@Api(tags = "管理端,优惠券活动接口")
|
||||
@RequestMapping("/manager/promotion/couponActivity")
|
||||
public class CouponActivityManagerController {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -19,13 +19,13 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 管理端,限时抢购接口
|
||||
* 管理端,秒杀活动接口
|
||||
*
|
||||
* @author paulG
|
||||
* @date 2020/8/20
|
||||
**/
|
||||
@RestController
|
||||
@Api(tags = "管理端,限时抢购接口")
|
||||
@Api(tags = "管理端,秒杀活动接口")
|
||||
@RequestMapping("/manager/promotion/seckill")
|
||||
public class SeckillManagerController {
|
||||
@Autowired
|
||||
@@ -34,7 +34,7 @@ public class SeckillManagerController {
|
||||
private SeckillApplyService seckillApplyService;
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation(value = "添加限时抢购")
|
||||
@ApiOperation(value = "添加秒杀活动")
|
||||
public ResultMessage<Seckill> addSeckill(SeckillVO seckillVO) {
|
||||
AuthUser currentUser = UserContext.getCurrentUser();
|
||||
seckillVO.setStoreId(currentUser.getId());
|
||||
@@ -45,7 +45,7 @@ public class SeckillManagerController {
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改限时抢购")
|
||||
@ApiOperation(value = "修改秒杀活动")
|
||||
public ResultMessage<Seckill> updateSeckill(SeckillVO seckillVO) {
|
||||
AuthUser currentUser = UserContext.getCurrentUser();
|
||||
seckillVO.setStoreId(currentUser.getId());
|
||||
@@ -62,7 +62,7 @@ public class SeckillManagerController {
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation(value = "分页查询限时抢购列表")
|
||||
@ApiOperation(value = "分页查询秒杀活动列表")
|
||||
public ResultMessage<IPage<SeckillVO>> getAll(SeckillSearchParams param, PageVO pageVo) {
|
||||
pageVo.setNotConvert(true);
|
||||
IPage<SeckillVO> page = seckillService.getSeckillByPageFromMongo(param, pageVo);
|
||||
@@ -70,38 +70,31 @@ public class SeckillManagerController {
|
||||
}
|
||||
|
||||
@DeleteMapping("/{id}")
|
||||
@ApiOperation(value = "删除一个限时抢购")
|
||||
@ApiOperation(value = "删除一个秒杀活动")
|
||||
public ResultMessage<Object> deleteSeckill(@PathVariable String id) {
|
||||
seckillService.deleteSeckill(id);
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
@PutMapping("/close/{id}")
|
||||
@ApiOperation(value = "关闭一个限时抢购")
|
||||
@ApiOperation(value = "关闭一个秒杀活动")
|
||||
public ResultMessage<Object> closeSeckill(@PathVariable String id) {
|
||||
seckillService.closeSeckill(id);
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
@PutMapping("/open/{id}")
|
||||
@ApiOperation(value = "一个限时抢购")
|
||||
@ApiOperation(value = "一个秒杀活动")
|
||||
public ResultMessage<Object> openSeckill(@PathVariable String id) {
|
||||
seckillService.openSeckill(id);
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
@GetMapping("/apply")
|
||||
@ApiOperation(value = "获取限时抢购申请列表")
|
||||
@ApiOperation(value = "获取秒杀活动申请列表")
|
||||
public ResultMessage<IPage<SeckillApply>> getSeckillApply(SeckillSearchParams param, PageVO pageVo) {
|
||||
IPage<SeckillApply> seckillApply = seckillApplyService.getSeckillApplyFromMongo(param, pageVo);
|
||||
return ResultUtil.data(seckillApply);
|
||||
}
|
||||
|
||||
@PutMapping("/apply/audit/{ids}")
|
||||
@ApiOperation(value = "审核多个限时抢购申请")
|
||||
public ResultMessage<Object> auditSeckillApply(@PathVariable String[] ids, String seckillId, String applyStatus, String failReason) {
|
||||
seckillApplyService.auditBatchApply(ids, seckillId, applyStatus, failReason);
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -83,11 +83,4 @@ class SeckillTest {
|
||||
Assertions.assertTrue(true);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
void audit() {
|
||||
seckillApplyService.auditBatchApply(new String[]{"1327169604003061760"}, "123456", PromotionApplyStatusEnum.PASS.name(), "");
|
||||
Assertions.assertTrue(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user