package com.hollywood.manage.controller;
|
|
|
import com.hollywood.common.basic.ApiResult;
|
import com.hollywood.common.basic.PageInfo;
|
import com.hollywood.common.model.TShortPlayTheme;
|
import com.hollywood.manage.query.TShortPlayThemeQuery;
|
import com.hollywood.manage.service.TShortPlayThemeService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
/**
|
* <p>
|
* 短剧题材 前端控制器
|
* </p>
|
*
|
* @author xiaochen
|
* @since 2024-02-29
|
*/
|
@Api(tags = "短剧题材")
|
@RestController
|
@RequestMapping("/tShortPlayTheme")
|
public class TShortPlayThemeController {
|
|
private final TShortPlayThemeService shortPlayThemeService;
|
|
@Autowired
|
public TShortPlayThemeController(TShortPlayThemeService shortPlayThemeService) {
|
this.shortPlayThemeService = shortPlayThemeService;
|
}
|
|
/**
|
* 获取短剧题材分页列表
|
*/
|
@ApiOperation(value = "获取短剧题材分页列表")
|
@PostMapping(value = "/pageList")
|
public ApiResult<PageInfo<TShortPlayTheme>> pageList(@RequestBody TShortPlayThemeQuery query) {
|
return ApiResult.success(shortPlayThemeService.pageList(query));
|
}
|
|
/**
|
* 新增短剧题材
|
*/
|
@ApiOperation(value = "新增短剧题材")
|
@PostMapping(value = "/addTShortPlayTheme")
|
public ApiResult<Boolean> addTShortPlayTheme(@RequestBody TShortPlayTheme shortPlayTheme) {
|
return ApiResult.success(shortPlayThemeService.save(shortPlayTheme));
|
}
|
|
/**
|
* 修改短剧题材
|
*/
|
@ApiOperation(value = "修改短剧题材")
|
@PostMapping(value = "/updateTShortPlayTheme")
|
public ApiResult<Boolean> updateTShortPlayTheme(@RequestBody TShortPlayTheme shortPlayTheme) {
|
return ApiResult.success(shortPlayThemeService.updateById(shortPlayTheme));
|
}
|
|
/**
|
* 删除短剧题材
|
*/
|
@ApiOperation(value = "删除短剧题材")
|
@DeleteMapping(value = "/deleteById")
|
public ApiResult<Boolean> deleteById(@RequestParam Long id) {
|
return ApiResult.success(shortPlayThemeService.removeById(id));
|
}
|
}
|