| | |
| | | package com.ruoyi.goods.controller; |
| | | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.goods.service.IGoodsGroupPurchaseService; |
| | | import lombok.RequiredArgsConstructor; |
| | | 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 |
| | | @RequiredArgsConstructor |
| | | @RequestMapping("/goods-group-purchase") |
| | | public class GoodsGroupPurchaseController { |
| | | |
| | | private final IGoodsGroupPurchaseService goodsGroupPurchaseService; |
| | | |
| | | @GetMapping("/start/{groupPurchaseId}") |
| | | R<?> startGroupPurchase(@PathVariable("groupPurchaseId") Long groupPurchaseId) { |
| | | goodsGroupPurchaseService.startGroupPurchase(groupPurchaseId); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @GetMapping("/end/{groupPurchaseId}") |
| | | R<?> endGroupPurchase(@PathVariable("groupPurchaseId") Long groupPurchaseId) { |
| | | goodsGroupPurchaseService.endGroupPurchase(groupPurchaseId); |
| | | return R.ok(); |
| | | } |
| | | } |