|
@@ -14,6 +14,7 @@ import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import javax.validation.Valid;
|
|
|
|
|
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
|
|
|
@@ -31,13 +32,13 @@ public class MuseumPictureGroupController {
|
|
|
|
|
|
@PostMapping("/create")
|
|
|
@Operation(summary = "新增图片组")
|
|
|
- public Integer createPictureGroup(@RequestBody MuseumPictureGroupSaveVO saveVO) {
|
|
|
+ public Integer createPictureGroup(@Valid @RequestBody MuseumPictureGroupSaveVO saveVO) {
|
|
|
return museumPictureGroupService.createPictureGroup(saveVO);
|
|
|
}
|
|
|
|
|
|
@PutMapping("/update")
|
|
|
@Operation(summary = "更新图片组")
|
|
|
- public CommonResult<Boolean> updatePictureGroup(@RequestBody MuseumPictureGroupSaveVO saveVO) {
|
|
|
+ public CommonResult<Boolean> updatePictureGroup(@Valid @RequestBody MuseumPictureGroupSaveVO saveVO) {
|
|
|
museumPictureGroupService.updatePictureGroup(saveVO);
|
|
|
return CommonResult.success(true);
|
|
|
}
|