|
|
@@ -1,11 +1,7 @@
|
|
|
package shop.alien.store.controller;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiImplicitParam;
|
|
|
-import io.swagger.annotations.ApiImplicitParams;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
-import io.swagger.annotations.ApiOperationSupport;
|
|
|
+import io.swagger.annotations.*;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -27,7 +23,11 @@ public class LifeUserLearningVideoController {
|
|
|
@ApiOperationSupport(order = 1)
|
|
|
@PostMapping("/add")
|
|
|
public R<String> add(@RequestBody LifeUserLearningVideo lifeUserLearningVideo) {
|
|
|
- return lifeUserLearningVideoService.add(lifeUserLearningVideo);
|
|
|
+ try {
|
|
|
+ return lifeUserLearningVideoService.add(lifeUserLearningVideo);
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@ApiOperation("根据ID删除学习视频")
|