package com.hmdp.controller; import com.hmdp.dto.Result; import com.hmdp.service.impl.VoucherOrderServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** *
* 前端控制器 *
* * @author 虎哥 * @since 2021-12-22 */ @RestController @RequestMapping("/voucher-order") public class VoucherOrderController { @Autowired private VoucherOrderServiceImpl voucherOrderService; @PostMapping("seckill/{id}") public Result seckillVoucher(@PathVariable("id") Long voucherId) { // System.out.println(voucherId); return voucherOrderService.seckillVoucher(voucherId); } }