|
@@ -0,0 +1,53 @@
|
|
|
+package cn.iocoder.yudao.module.museum.controller.admin.museummodel;
|
|
|
+
|
|
|
+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.museummodel.vo.MuseummodelRespVO;
|
|
|
+import cn.iocoder.yudao.module.museum.controller.admin.museummodel.vo.MuseummodelSaveVO;
|
|
|
+import cn.iocoder.yudao.module.museum.dal.database.museummodel.MuseummodelDO;
|
|
|
+import cn.iocoder.yudao.module.museum.service.museummodel.MuseummodelService;
|
|
|
+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/model")
|
|
|
+@Validated
|
|
|
+public class MuseummodelController {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private MuseummodelService museumModelService;
|
|
|
+
|
|
|
+ @PostMapping("/create")
|
|
|
+ @Operation(summary = "新增模型")
|
|
|
+ public Integer createMuseumModel(@RequestBody MuseummodelSaveVO saveVO){
|
|
|
+ return museumModelService.createMuseumModel(saveVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PutMapping("/update")
|
|
|
+ @Operation(summary = "更新模型")
|
|
|
+ public CommonResult<Boolean> updateMuseumModel(@RequestBody MuseummodelSaveVO saveVO){
|
|
|
+ museumModelService.updateMuseumModel(saveVO);
|
|
|
+ return CommonResult.success(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ @DeleteMapping("/delete")
|
|
|
+ @Operation(summary = "删除模型")
|
|
|
+ public CommonResult<Boolean> deleteMuseumModel(@RequestParam("id") Integer id){
|
|
|
+ museumModelService.deleteMuseumModel(id);
|
|
|
+ return CommonResult.success(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/get")
|
|
|
+ @Operation(summary = "查找模型")
|
|
|
+ public CommonResult<MuseummodelRespVO> getMuseumModel(@RequestParam("id") Integer id){
|
|
|
+ MuseummodelDO result = museumModelService.selectMuseumModel(id);
|
|
|
+ MuseummodelRespVO result1 = BeanUtils.toBean(result, MuseummodelRespVO.class);
|
|
|
+ return CommonResult.success(result1);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|