From e0fdee52064c97bf97240b6ed2d9103949546784 Mon Sep 17 00:00:00 2001 From: 7ijin01 Date: Mon, 15 Sep 2025 22:51:52 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20tourspotId,=20imageUrl=20=ED=95=84?= =?UTF-8?q?=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tourspot/dto/response/TourSpotDetailResponse.java | 2 ++ .../domain/tourspot/mapper/TourSpotDetailMapper.java | 2 ++ .../opendata/domain/tourspot/service/TourSpotService.java | 8 ++++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/opendata/domain/tourspot/dto/response/TourSpotDetailResponse.java b/src/main/java/com/opendata/domain/tourspot/dto/response/TourSpotDetailResponse.java index 5861a5a..b614bb1 100644 --- a/src/main/java/com/opendata/domain/tourspot/dto/response/TourSpotDetailResponse.java +++ b/src/main/java/com/opendata/domain/tourspot/dto/response/TourSpotDetailResponse.java @@ -20,9 +20,11 @@ @NoArgsConstructor @AllArgsConstructor public class TourSpotDetailResponse { + private Long tourspotId; private String tourspotNm; private AddressDto address; private String congestionLabel; + private String imageUrl; private List tourSpotEvents; private List tourSpotTags; private List tourSpotMonthlyCongestionDtos; diff --git a/src/main/java/com/opendata/domain/tourspot/mapper/TourSpotDetailMapper.java b/src/main/java/com/opendata/domain/tourspot/mapper/TourSpotDetailMapper.java index cb34701..29bf331 100644 --- a/src/main/java/com/opendata/domain/tourspot/mapper/TourSpotDetailMapper.java +++ b/src/main/java/com/opendata/domain/tourspot/mapper/TourSpotDetailMapper.java @@ -25,6 +25,7 @@ public interface TourSpotDetailMapper { @Mapping(target = "tourspotNm", source = "tourSpot.tourspotNm") + @Mapping(target = "imageUrl", source = "imageUrl") @Mapping(target = "address", source = "address") @Mapping(target = "congestionLabel", source = "congestion") @Mapping(target = "tourSpotEvents", source = "events") @@ -32,6 +33,7 @@ public interface TourSpotDetailMapper { @Mapping(target = "tourSpotMonthlyCongestionDtos", source = "monthlyCongestions") TourSpotDetailResponse toResponse( TourSpot tourSpot, + String imageUrl, AddressDto address, String congestion, List events, diff --git a/src/main/java/com/opendata/domain/tourspot/service/TourSpotService.java b/src/main/java/com/opendata/domain/tourspot/service/TourSpotService.java index accc5a7..89718f2 100644 --- a/src/main/java/com/opendata/domain/tourspot/service/TourSpotService.java +++ b/src/main/java/com/opendata/domain/tourspot/service/TourSpotService.java @@ -54,6 +54,7 @@ public class TourSpotService private final CustomTourSpotCombineRepository combineRepository; private final CurrentCongestionRepository currentCongestionRepository; private final FutureCongestionRepository futureCongestionRepository; + private final TourSpotImageRepository tourSpotImageRepository; private final AddressCache addressCache; @@ -75,7 +76,9 @@ public TourSpotDetailResponse combineTourSpotDetail(Long tourspotId) throws Json List tourSpotEvents = tourSpotEventRepository.findAllByTourSpot(tourSpot); List tourSpotTags = tourSpotTagRepository.findAllByTourSpot(tourSpot); List monthlyCongestions = monthlyCongestionRepository.findAllByTourspot(tourSpot); - + String imageUrl = tourSpotImageRepository.findByTourSpot(tourSpot) + .orElseThrow(() -> new GlobalException(ErrorStatus.TOURSPOT_NOT_FOUND)) + .getTourspotImgUrl(); String congestionLabel = null; if (tourSpotCurrentCongestion != null) { congestionLabel = tourSpotCurrentCongestion.getCongestionLvl().getCongestionLabel(); @@ -84,6 +87,7 @@ public TourSpotDetailResponse combineTourSpotDetail(Long tourspotId) throws Json return tourSpotDetailMapper.toResponse( tourSpot, + imageUrl, tourSpotDetailMapper.toAddressDto(address), congestionLabel, tourSpotDetailMapper.toEventDtos(tourSpotEvents), @@ -115,7 +119,7 @@ public PageResponse> combineTourSpotMeta(Pageable pag } - @Scheduled(cron = "0 0/10 * * * *", zone = "Asia/Seoul") + // @Scheduled(cron = "0 0/10 * * * *", zone = "Asia/Seoul") @Transactional public void fetchAllAreaAndSave() { List areaNames = new AreaApi.AreaParam().getAreaInfos(); From 0d3c232e3ef47118f92779fe4b060fd3ab1979f2 Mon Sep 17 00:00:00 2001 From: 7ijin01 Date: Mon, 15 Sep 2025 22:52:11 +0900 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=EB=B0=B0=ED=8F=AC=20=EB=B8=8C?= =?UTF-8?q?=EB=9E=9C=EC=B9=98=20=EB=B3=B5=EA=B5=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e08469a..77d85e1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: CI / CD on: push: - branches: [feat/#85-logout] + branches: [main] jobs: CI: From 8011744151accbf26facff087184b5b32b0dd0d7 Mon Sep 17 00:00:00 2001 From: 7ijin01 Date: Mon, 15 Sep 2025 22:52:47 +0900 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=EC=8A=A4=EC=BC=80=EC=A4=84=20?= =?UTF-8?q?=ED=99=9C=EC=84=B1=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/opendata/domain/tourspot/service/TourSpotService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/opendata/domain/tourspot/service/TourSpotService.java b/src/main/java/com/opendata/domain/tourspot/service/TourSpotService.java index 89718f2..c2dc8dd 100644 --- a/src/main/java/com/opendata/domain/tourspot/service/TourSpotService.java +++ b/src/main/java/com/opendata/domain/tourspot/service/TourSpotService.java @@ -119,7 +119,7 @@ public PageResponse> combineTourSpotMeta(Pageable pag } - // @Scheduled(cron = "0 0/10 * * * *", zone = "Asia/Seoul") + @Scheduled(cron = "0 0/10 * * * *", zone = "Asia/Seoul") @Transactional public void fetchAllAreaAndSave() { List areaNames = new AreaApi.AreaParam().getAreaInfos();