| | |
| | | import cn.lili.modules.lmk.domain.query.ActivityQuery; |
| | | import cn.lili.modules.lmk.domain.query.NewsQuery; |
| | | import cn.lili.modules.lmk.service.NewsService; |
| | | import cn.lili.utils.HtmlUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | @PostMapping |
| | | @ApiOperation(value = "添加", notes = "添加") |
| | | public Result add(@RequestBody @Validated(Add.class) NewsForm form) { |
| | | form.setContent(HtmlUtil.addVideoControls(form.getContent())); |
| | | return newsService.add(form); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | public Result update(@RequestBody @Validated(Update.class) NewsForm form) { |
| | | form.setContent(HtmlUtil.addVideoControls(form.getContent())); |
| | | return newsService.update(form); |
| | | } |
| | | |