|
@@ -0,0 +1,49 @@
|
|
|
+package cn.iocoder.yudao.module.museum.controller.admin.museumtext;
|
|
|
+
|
|
|
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
|
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
|
+import cn.iocoder.yudao.module.museum.controller.admin.museumtext.vo.MuseumTextRespVO;
|
|
|
+import cn.iocoder.yudao.module.museum.controller.admin.museumtext.vo.MuseumTextSaveVO;
|
|
|
+import cn.iocoder.yudao.module.museum.dal.database.museumtext.MuseumTextDO;
|
|
|
+import cn.iocoder.yudao.module.museum.service.museumtext.MuseumTextService;
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
+import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+
|
|
|
+@Tag(name="练习")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/museum/text")
|
|
|
+@Validated
|
|
|
+public class MuseumTextController {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private MuseumTextService museumTextService;
|
|
|
+
|
|
|
+ @PostMapping("/create")
|
|
|
+ @Operation(summary = "新增")
|
|
|
+ public Integer createMuseumText(@RequestBody MuseumTextSaveVO saveVO) {
|
|
|
+ return museumTextService.createMuseumText(saveVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PutMapping("/update")
|
|
|
+ @Operation(summary = "更新")
|
|
|
+ public CommonResult<Boolean> updateMuseumText(@RequestBody MuseumTextSaveVO saveVO){
|
|
|
+ museumTextService.updateMuseumText(saveVO);
|
|
|
+ return CommonResult.success(true);
|
|
|
+ }
|
|
|
+ @DeleteMapping("/delete")
|
|
|
+ @Operation(summary = "删除")
|
|
|
+ public CommonResult<Boolean> deleteMuseumText(@RequestParam("id") Integer id){
|
|
|
+ museumTextService.deleteMuseumText(id);
|
|
|
+ return CommonResult.success(true);
|
|
|
+ }
|
|
|
+ @GetMapping("/get")
|
|
|
+ @Operation(summary = "查询")
|
|
|
+ public CommonResult<MuseumTextRespVO> getMuseumText(@RequestParam("id") Integer id){
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+
|