| | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.promotion.controller.management.dto.MgtPromotionVideoDTO; |
| | | import com.ruoyi.promotion.controller.management.dto.MgtPromotionVideoQuery; |
| | | import com.ruoyi.promotion.controller.management.vo.MgtPromotionVideoVO; |
| | | import com.ruoyi.promotion.service.IPromotionVideoService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | 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; |
| | |
| | | MgtPromotionVideoQuery query) { |
| | | return R.ok(promotionVideoService.getPromotionVideoPage(query)); |
| | | } |
| | | |
| | | /** |
| | | * 删除视频 |
| | | * |
| | | * @param id 视频id |
| | | */ |
| | | @ApiOperation("删除视频") |
| | | @DeleteMapping("/{id}") |
| | | public R<?> delPromotionVideo( |
| | | @ApiParam(name = "id", value = "视频id", required = true) @PathVariable("id") Long id) { |
| | | promotionVideoService.removeById(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 添加/编辑视频 |
| | | * |
| | | * @param dto 大屏视频视图对象 |
| | | */ |
| | | @ApiOperation("添加/编辑视频") |
| | | @PostMapping("/save") |
| | | public R<?> saveOrUpdatePromotionVideo(@RequestBody MgtPromotionVideoDTO dto) { |
| | | promotionVideoService.saveOrUpdatePromotionVideo(dto); |
| | | return R.ok(); |
| | | } |
| | | } |