| | |
| | | import com.mzl.flower.base.BaseController; |
| | | import com.mzl.flower.base.R; |
| | | import com.mzl.flower.base.ReturnDataDTO; |
| | | import com.mzl.flower.dto.BatchDTO; |
| | | import com.mzl.flower.dto.request.filmwork.FilmWorksDTO; |
| | | import com.mzl.flower.dto.request.filmwork.FilmWorksQueryDTO; |
| | | import com.mzl.flower.dto.response.content.BannerDTO; |
| | | import com.mzl.flower.dto.response.filmwork.FilmWorksVO; |
| | | import com.mzl.flower.service.film.FilmWorksService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | @GetMapping("/filmWorks/changeStatus") |
| | | @ApiOperation(value = "修改状态", notes = "修改状态") |
| | | public ResponseEntity<ReturnDataDTO> changeStatus(@NotNull(message = "id不能为空") Long id) { |
| | | filmWorksService.changeStatus(id); |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/filmWorks/delete/batch") |
| | | @ApiOperation(value = "批量删除", notes = "批量删除") |
| | | public ResponseEntity<ReturnDataDTO> batchDelete(@Validated @RequestBody BatchDTO dto) { |
| | | filmWorksService.batchDelete(dto); |
| | | return returnData(R.SUCCESS.getCode(),null); |
| | | } |
| | | |
| | | @PostMapping("/filmWorks/publish/batch") |
| | | @ApiOperation(value = "批量发布", notes = "批量发布") |
| | | public ResponseEntity<ReturnDataDTO> batchPublish(@Validated @RequestBody BatchDTO dto) { |
| | | filmWorksService.batchPublish(dto); |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | @GetMapping("/filmWorks/list/view") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | public ResponseEntity<ReturnDataDTO<FilmWorksVO>> detail(@NotNull(message = "id不能为空") Long id) { |
| | | return returnData(R.SUCCESS.getCode(),filmWorksService.detail(id)); |
| | | } |
| | | |
| | | } |
| | | |