|
@@ -33,8 +33,19 @@ public class MuseummodelController {
|
|
|
|
|
|
@PostMapping("/create")
|
|
|
@Operation(summary = "新增模型")
|
|
|
- public Integer createMuseumModel(@RequestBody MuseummodelSaveVO saveVO) {
|
|
|
- return museumModelService.createMuseumModel(saveVO);
|
|
|
+ public CommonResult<Boolean> createMuseumModel(@RequestBody MuseummodelSaveVO saveVO) {
|
|
|
+ String modelName =saveVO.getModelName();
|
|
|
+ String specimenNumber =saveVO.getSpecimenNumber();
|
|
|
+ String modelWay =saveVO.getModelWay();
|
|
|
+ if (modelName == null) {
|
|
|
+ return CommonResult.error(200,"模型名称不能为空");
|
|
|
+ } else if (specimenNumber == null){
|
|
|
+ return CommonResult.error(200,"标本编号不能为空");
|
|
|
+ }else if (modelWay == null){
|
|
|
+ return CommonResult.error(200,"模型路径不能为空");
|
|
|
+ }else
|
|
|
+ museumModelService.createMuseumModel(saveVO);
|
|
|
+ return CommonResult.success(true);
|
|
|
}
|
|
|
|
|
|
@PutMapping("/update")
|