| | |
| | | |
| | | import cn.lili.group.Update; |
| | | import cn.lili.group.Add; |
| | | import cn.lili.modules.lmk.domain.form.VideoAuditingForm; |
| | | import cn.lili.modules.lmk.domain.form.VideoDownForm; |
| | | import cn.lili.modules.lmk.domain.form.VideoRecommendForm; |
| | | import cn.lili.modules.lmk.domain.query.ManagerVideoQuery; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | return videoService.remove(ids); |
| | | } |
| | | |
| | | @GetMapping("/page") |
| | | @PostMapping("/page") |
| | | @ApiOperation(value = "分页", notes = "分页") |
| | | public Result page(VideoQuery query) { |
| | | return videoService.page(query); |
| | | public Result page(@RequestBody ManagerVideoQuery query) { |
| | | return videoService.managerPage(query); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | public Result detail(@PathVariable("id") Integer id) { |
| | | public Result detail(@PathVariable("id") String id) { |
| | | return videoService.detail(id); |
| | | } |
| | | |
| | |
| | | public Result list() { |
| | | return videoService.all(); |
| | | } |
| | | |
| | | @PutMapping("/recommend") |
| | | @ApiOperation(value = "首页推荐设置", notes = "首页推荐设置") |
| | | public Result recommendSet(@RequestBody @Validated VideoRecommendForm form) { |
| | | return videoService.recommendSet(form); |
| | | } |
| | | |
| | | @PostMapping("/auditing") |
| | | @ApiOperation(value = "审核", notes = "审核") |
| | | public Result auditing(@RequestBody @Validated VideoAuditingForm form) { |
| | | return videoService.auditing(form); |
| | | } |
| | | |
| | | @PostMapping("/up/{id}") |
| | | @ApiOperation(value = "上架", notes = "上架") |
| | | public Result up(@PathVariable("id") String id) { |
| | | return videoService.up(id); |
| | | } |
| | | |
| | | @PostMapping("/down") |
| | | @ApiOperation(value = "下架", notes = "下架") |
| | | public Result down(@RequestBody @Validated VideoDownForm form) { |
| | | return videoService.down(form); |
| | | } |
| | | } |