Skip to content

Commit

Permalink
관측지 이미지 출처조회
Browse files Browse the repository at this point in the history
  • Loading branch information
gyulchyoung committed Oct 12, 2021
1 parent adb0d48 commit fff59b1
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.server.tourApiProject.observation.observeFee.ObserveFee;
import com.server.tourApiProject.observation.observeFee.ObserveFeeService;
import com.server.tourApiProject.observation.observeHashTag.ObserveHashTagService;
import com.server.tourApiProject.observation.observeImage.ObserveImageParams2;
import com.server.tourApiProject.observation.observeImage.ObserveImageService;
import com.server.tourApiProject.touristPoint.touristData.TouristDataCourseParams;
import io.swagger.annotations.Api;
Expand Down Expand Up @@ -48,6 +49,12 @@ public List<String> getObserveImagePath(@PathVariable("observationId") Long obse
return observeImageService.getObserveImage(observationId);
}

@ApiOperation(value = "관측지 이미지 정보 조회", notes = "관측지 이미지경로와 출처를 id로 조회한다")
@GetMapping(value = "observation/{observationId}/observeImageInfo")
public List<ObserveImageParams2> getObserveImageInfo(@PathVariable("observationId") Long observationId){
return observeImageService.getObserveImageInfo(observationId);
}

@ApiOperation(value = "관측지 해쉬태그 조회 ", notes = "관측지id로 해쉬태그를 조회한다")
@GetMapping(value = "observation/{observationId}/observeHashTag")
public List<String> getObserveHashTags(@PathVariable("observationId") Long observationId){
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.server.tourApiProject.observation.observeImage;

import lombok.*;

@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class ObserveImageParams2 {
private String image;
private String imageSource;
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ public List<String> getObserveImage(Long observationId) {
return observeImagePathList;
}

public List<ObserveImageParams2> getObserveImageInfo(Long observationId) {
List<ObserveImageParams2> observeImageInfos =new ArrayList<>();
List<ObserveImage> observeImageList = observeImageRepository.findByObservationId(observationId);
for(ObserveImage p : observeImageList) {
ObserveImageParams2 info = new ObserveImageParams2();
info.setImage(p.getImage());
info.setImageSource(p.getImageSource());
observeImageInfos.add(info);
}
return observeImageInfos;
}



}

0 comments on commit fff59b1

Please sign in to comment.