| | |
| | | package com.ruoyi.order.controller; |
| | | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.annotation.InnerAuth; |
| | | import com.ruoyi.order.service.IOrderService; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | |
| | | * @author mitao |
| | | * @since 2024-05-16 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/order") |
| | | @AllArgsConstructor |
| | | public class OrderController { |
| | | |
| | | private final IOrderService orderService; |
| | | |
| | | /** |
| | | * 获取某个商品的已购会员数 |
| | | * |
| | | * @param id 秒杀商品id |
| | | * @return 已购会员数 |
| | | */ |
| | | @InnerAuth |
| | | @GetMapping("/seckill-members/{id}") |
| | | R<Integer> getSeckillMembers(@PathVariable("id") Long id) { |
| | | return R.ok(orderService.getSeckillMembers(id)); |
| | | } |
| | | } |