ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/inner/GoodsSeckillController.java
@@ -1,6 +1,7 @@
package com.ruoyi.goods.controller.inner;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.security.annotation.InnerAuth;
import com.ruoyi.goods.service.IGoodsSeckillService;
@@ -31,6 +32,7 @@
    private final IGoodsSeckillService goodsSeckillService;
    @InnerAuth
    @PostMapping("/getGoodsSeckillOne")
    @ResponseBody
    public R<GoodsSeckill> getGoodsSeckillOne(@RequestBody Integer goodsSkuId) {
@@ -45,7 +47,12 @@
    @InnerAuth
    @GetMapping("/start/{seckillId}")
    R<?> startSeckill(@PathVariable("seckillId") Long seckillId) {
        goodsSeckillService.startSeckill(seckillId);
        try {
            goodsSeckillService.startSeckill(seckillId);
        } catch (JsonProcessingException e) {
            log.error("秒杀开始异常", e);
            return R.fail();
        }
        return R.ok();
    }
@@ -57,7 +64,12 @@
    @InnerAuth
    @GetMapping("/end/{seckillId}")
    R<?> endSeckill(@PathVariable("seckillId") Long seckillId) {
        goodsSeckillService.endSeckill(seckillId);
        try {
            goodsSeckillService.endSeckill(seckillId);
        } catch (JsonProcessingException e) {
            log.error("秒杀结束异常", e);
            return R.fail();
        }
        return R.ok();
    }