package com.ruoyi.goods.controller.forepart;
|
|
|
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.utils.page.PageDTO;
|
import com.ruoyi.goods.service.IGoodsSeckillService;
|
import com.ruoyi.system.api.domain.dto.HomeGoodsSkuDTO;
|
import com.ruoyi.system.api.domain.vo.HomeGoodsSeckillInfoVO;
|
import com.ruoyi.system.api.domain.vo.HomeGoodsSeckillVO;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.RequiredArgsConstructor;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.web.bind.annotation.*;
|
|
/**
|
* <p>
|
* 商品秒杀表 前端控制器
|
* </p>
|
*
|
* @author mitao
|
* @since 2024-05-16
|
*/
|
@Slf4j
|
@RestController
|
@RequiredArgsConstructor
|
@RequestMapping("/forepart/goods-seckill")
|
@Api(value = "用戶端-商品秒杀接口", tags = "用戶端-商品秒杀接口", description = "用戶端-商品秒杀接口")
|
public class ForepartGoodsSeckillController {
|
|
private final IGoodsSeckillService goodsSeckillService;
|
|
|
@RequestMapping("/getHomeGoodsSeckillVOList")
|
@ApiOperation(value = "用户端-秒杀商品列表")
|
public R<PageDTO<HomeGoodsSeckillVO>> getHomeGoodsSeckillVOList(@RequestBody HomeGoodsSkuDTO homeGoodsSkuDTO) {
|
return R.ok(goodsSeckillService.getHomeGoodsSeckillVOList(homeGoodsSkuDTO));
|
}
|
|
@RequestMapping("/getHomeGoodsSeckillInfo")
|
@ApiOperation(value = "用户端-秒杀商品详情")
|
public R<HomeGoodsSeckillInfoVO> getHomeGoodsSeckillInfo(@RequestBody HomeGoodsSkuDTO homeGoodsSkuDTO) {
|
return R.ok(goodsSeckillService.getHomeGoodsSeckillInfo(homeGoodsSkuDTO));
|
}
|
|
}
|