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;
|
|
/**
|
* <p>
|
* 商品团购表 前端控制器
|
* </p>
|
*
|
* @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();
|
}
|
}
|