mitao
2024-06-03 a6508a543e3727eb527db5feec9ac7155e88f599
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/inner/GoodsSeckillController.java
@@ -6,15 +6,12 @@
import com.ruoyi.common.security.annotation.InnerAuth;
import com.ruoyi.goods.service.IGoodsSeckillService;
import com.ruoyi.system.api.domain.GoodsSeckill;
import com.ruoyi.system.api.domain.dto.GoodsStockUpdDTO;
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.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * <p>
@@ -39,6 +36,17 @@
        GoodsSeckill GoodsSeckillOne = goodsSeckillService.getById(goodsSkuId);
        return R.ok(GoodsSeckillOne);
    }
    @InnerAuth
    @PutMapping("/updGoodsSeckill")
    R<?> updGoodsSeckill(@RequestBody GoodsStockUpdDTO goodsStockUpdDTOS) {
        GoodsSeckill GoodsSeckillOne = goodsSeckillService.getById(goodsStockUpdDTOS);
        GoodsSeckillOne.setSeckillStock(goodsStockUpdDTOS.getAuctionStock());
        goodsSeckillService.updateById(GoodsSeckillOne);
        return R.ok();
    }
    /**
     * 开始秒杀
     *