package com.hollywood.manage.controller; import com.hollywood.common.basic.ApiResult; import com.hollywood.common.basic.PageInfo; import com.hollywood.common.model.TShortPlayType; import com.hollywood.manage.query.TShortPlayTypeQuery; import com.hollywood.manage.service.TShortPlayTypeService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; /** *

* 短剧类别 前端控制器 *

* * @author xiaochen * @since 2024-02-29 */ @Api(tags = "短剧类别") @RestController @RequestMapping("/tShortPlayType") public class TShortPlayTypeController { private final TShortPlayTypeService shortPlayTypeService; @Autowired public TShortPlayTypeController(TShortPlayTypeService shortPlayTypeService) { this.shortPlayTypeService = shortPlayTypeService; } /** * 获取短剧类别分页列表 */ @ApiOperation(value = "获取短剧类别分页列表") @PostMapping(value = "/pageList") public ApiResult> pageList(@RequestBody TShortPlayTypeQuery query) { return ApiResult.success(shortPlayTypeService.pageList(query)); } /** * 新增短剧类别 */ @ApiOperation(value = "新增短剧类别") @PostMapping(value = "/addTShortPlayType") public ApiResult addTShortPlayType(@RequestBody TShortPlayType shortPlayType) { return ApiResult.success(shortPlayTypeService.save(shortPlayType)); } /** * 修改短剧类别 */ @ApiOperation(value = "修改短剧类别") @PostMapping(value = "/updateTShortPlayType") public ApiResult updateTShortPlayType(@RequestBody TShortPlayType shortPlayType) { return ApiResult.success(shortPlayTypeService.updateById(shortPlayType)); } /** * 删除短剧类别 */ @ApiOperation(value = "删除短剧类别") @DeleteMapping(value = "/deleteById") public ApiResult deleteById(@RequestParam Long id) { return ApiResult.success(shortPlayTypeService.removeById(id)); } }