|
@@ -15,9 +15,12 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
|
|
|
|
@Tag(name = "博物馆-图片库")
|
|
@@ -34,7 +37,7 @@ public class MuseumPictureController {
|
|
|
private PicturePageReqVO pageVO;
|
|
|
|
|
|
@PostMapping("/create")
|
|
|
- @Operation(summary = "新增图片")
|
|
|
+ @Operation(summary = "新增照片组图片")
|
|
|
public Integer createMuseumPicture(@RequestBody MuseumPictureSaveVO saveVO) {
|
|
|
return museumPictureService.createMuseumPicture(saveVO);
|
|
|
}
|
|
@@ -54,7 +57,7 @@ public class MuseumPictureController {
|
|
|
}
|
|
|
|
|
|
@GetMapping("/get")
|
|
|
- @Operation(summary = "查找图片")
|
|
|
+ @Operation(summary = "查找图片(图片id)")
|
|
|
public CommonResult<MuseumPictureRespVO> getMuseumPicture(@RequestParam("pictureId") Integer pictureId) {
|
|
|
|
|
|
// if (pictureId==null) {
|
|
@@ -66,6 +69,18 @@ public class MuseumPictureController {
|
|
|
// }
|
|
|
}
|
|
|
|
|
|
+ @GetMapping("/get")
|
|
|
+ @Operation(summary = "查找图片(图片组id)")
|
|
|
+ public CommonResult<MuseumPictureRespVO> getMuseumPictureGroup(@RequestParam("groupId") Integer groupId) {
|
|
|
+
|
|
|
+// if (groupId==null) {
|
|
|
+// return CommonResult.error(1,"该照片组不存在");
|
|
|
+// }else {
|
|
|
+ MuseumPictureDO list = museumPictureService.selectMuseumPicture(groupId);
|
|
|
+ MuseumPictureRespVO list1 = BeanUtils.toBean(list, MuseumPictureRespVO.class);
|
|
|
+ return CommonResult.success(list1);
|
|
|
+// }
|
|
|
+ }
|
|
|
|
|
|
@GetMapping("/page")
|
|
|
@Operation(summary = "获得照片分页")
|