Skip to content

Commit 0c8f365

Browse files
authored
Merge pull request #56 from JocketDan/refactor/tour-open-api-language
refactor: Migrate Tour OPEN API from Korean to English version
2 parents defcf7b + b80c7bc commit 0c8f365

4 files changed

Lines changed: 57 additions & 74 deletions

File tree

tour/src/main/java/com/jocketdan/tour/config/WebClientConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class WebClientConfig {
1010

1111
@Bean
1212
public WebClient webClient() {
13-
String baseUrl = "https://apis.data.go.kr/B551011/KorService2";
13+
String baseUrl = "https://apis.data.go.kr/B551011/EngService2";
1414

1515
DefaultUriBuilderFactory factory = new DefaultUriBuilderFactory(baseUrl);
1616
factory.setEncodingMode(DefaultUriBuilderFactory.EncodingMode.VALUES_ONLY);

tour/src/main/java/com/jocketdan/tour/controller/TourOpenApiController.java

Lines changed: 50 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ public class TourOpenApiController {
3232
- R: 대표이미지 있는 생성일순
3333
<br/><br/>
3434
**관광 타입 (contentTypeId)**
35-
- 12: 관광지
36-
- 14: 문화시설
37-
- 15: 축제/공연/행사
38-
- 25: 여행코스
39-
- 28: 레포츠
40-
- 32: 숙박
41-
- 38: 쇼핑
42-
- 39: 음식점
35+
- 75:레포츠
36+
- 76:관광지
37+
- 77:교통
38+
- 78:문화시설
39+
- 79:쇼핑
40+
- 80:숙박
41+
- 82:음식점
42+
- 85:축제공연행사
4343
"""
4444
)
4545
@GetMapping("/api/tour/areaBasedList")
@@ -50,7 +50,7 @@ public AreaBasedListResponseDTO getAreaBasedList(
5050
@Parameter(description = "정렬 구분 (A, C, D, O, Q, R)", example = "A")
5151
@RequestParam(defaultValue = "A") String arrange,
5252

53-
@Parameter(description = "관광 타입 ID", example = "12")
53+
@Parameter(description = "관광 타입 ID", example = "75")
5454
@RequestParam(required = false) String contentTypeId,
5555

5656
@Parameter(description = "법정동 코드")
@@ -92,9 +92,12 @@ public SearchFestivalResponseDTO getSearchFestival(
9292
String lDongSignguCd,
9393

9494
@Parameter(description = "행사 시작일 (YYYYMMDD)", example = "20251001")
95-
@RequestParam String eventStartDate
95+
@RequestParam String eventStartDate,
96+
97+
@Parameter(description = "행사 종료일 (YYYYMMDD)", example = "20251231")
98+
@RequestParam(required = false) String eventEndDate
9699
) {
97-
return tourOpenApiService.getSearchFestival(numOfRows, pageNo, arrange, lDongRegnCd, lDongSignguCd, eventStartDate);
100+
return tourOpenApiService.getSearchFestival(numOfRows, pageNo, arrange, lDongRegnCd, lDongSignguCd, eventStartDate, eventEndDate);
98101
}
99102

100103
@Operation(
@@ -111,14 +114,14 @@ public SearchFestivalResponseDTO getSearchFestival(
111114
- R: 대표이미지 있는 생성일순
112115
<br/><br/>
113116
**관광 타입 (contentTypeId)**
114-
- 12: 관광지
115-
- 14: 문화시설
116-
- 15: 축제/공연/행사
117-
- 25: 여행코스
118-
- 28: 레포츠
119-
- 32: 숙박
120-
- 38: 쇼핑
121-
- 39: 음식점
117+
- 75:레포츠
118+
- 76:관광지
119+
- 77:교통
120+
- 78:문화시설
121+
- 79:쇼핑
122+
- 80:숙박
123+
- 82:음식점
124+
- 85:축제공연행사
122125
"""
123126
)
124127
@GetMapping("/api/tour/searchKeyword")
@@ -128,7 +131,7 @@ public SearchKeywordResponseDTO getSearchKeyword(
128131
@Parameter(description = "정렬 구분 (A, C, D, O, Q, R)", example = "A")
129132
@RequestParam(defaultValue = "A") String arrange,
130133

131-
@Parameter(description = "관광 타입 ID", example = "12")
134+
@Parameter(description = "관광 타입 ID", example = "75")
132135
@RequestParam(required = false) String contentTypeId,
133136

134137
@Parameter(description = "법정동 코드") @RequestParam(required = false)
@@ -137,7 +140,7 @@ public SearchKeywordResponseDTO getSearchKeyword(
137140
@Parameter(description = "시군구 코드") @RequestParam(required = false)
138141
String lDongSignguCd,
139142

140-
@Parameter(description = "검색 키워드", example = "서울")
143+
@Parameter(description = "검색 키워드", example = "seoul")
141144
@RequestParam String keyword
142145
) {
143146
return tourOpenApiService.getSearchKeyword(numOfRows, pageNo, arrange, contentTypeId, lDongRegnCd, lDongSignguCd, keyword);
@@ -146,32 +149,32 @@ public SearchKeywordResponseDTO getSearchKeyword(
146149
@Operation(
147150
summary = "위치 기반 관광정보 조회",
148151
description = """
149-
사용자의 위치(GPS 좌표)를 기반으로 반경 내 관광 정보를 조회합니다.
150-
<br/><br/>
151-
**정렬 구분 (arrange)**
152-
- A: 제목순
153-
- C: 수정일순
154-
- D: 생성일순
155-
- E: 거리순
156-
- O: 대표이미지 있는 제목순
157-
- Q: 대표이미지 있는 수정일순
158-
- R: 대표이미지 있는 생성일순
159-
- S: 대표이미지 있는 거리순
160-
<br/><br/>
152+
사용자의 위치(GPS 좌표)를 기반으로 반경 내 관광 정보를 조회합니다.
153+
<br/><br/>
154+
**정렬 구분 (arrange)**
155+
- A: 제목순
156+
- C: 수정일순
157+
- D: 생성일순
158+
- E: 거리순
159+
- O: 대표이미지 있는 제목순
160+
- Q: 대표이미지 있는 수정일순
161+
- R: 대표이미지 있는 생성일순
162+
- S: 대표이미지 있는 거리순
163+
<br/><br/>
161164
**관광 타입 (contentTypeId)**
162-
- 12: 관광지
163-
- 14: 문화시설
164-
- 15: 축제/공연/행사
165-
- 25: 여행코스
166-
- 28: 레포츠
167-
- 32: 숙박
168-
- 38: 쇼핑
169-
- 39: 음식점
170-
<br/><br/>
171-
**좌표 정보**
172-
- mapX: GPS X좌표 (WGS84 경도)
173-
- mapY: GPS Y좌표 (WGS84 위도)
174-
- radius: 검색 반경 (m), 최대 20000m (20km)
165+
- 75:레포츠
166+
- 76:관광지
167+
- 77:교통
168+
- 78:문화시설
169+
- 79:쇼핑
170+
- 80:숙박
171+
- 82:음식점
172+
- 85:축제공연행사
173+
<br/><br/>
174+
**좌표 정보**
175+
- mapX: GPS X좌표 (WGS84 경도)
176+
- mapY: GPS Y좌표 (WGS84 위도)
177+
- radius: 검색 반경 (m), 최대 20000m (20km)
175178
"""
176179
)
177180
@GetMapping("/api/tour/locationBasedList")
@@ -181,7 +184,7 @@ public LocationBasedListResponseDTO getLocationBasedList(
181184
@Parameter(description = "정렬 구분 (A, C, D, E, O, Q, R, S)", example = "E")
182185
@RequestParam(defaultValue = "A") String arrange,
183186

184-
@Parameter(description = "관광 타입 ID", example = "12")
187+
@Parameter(description = "관광 타입 ID", example = "75")
185188
@RequestParam(required = false) String contentTypeId,
186189

187190
@Parameter(description = "법정동 코드") @RequestParam(required = false)

tour/src/main/java/com/jocketdan/tour/service/TourOpenApiService.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import com.jocketdan.tour.exception.CustomException;
66
import com.jocketdan.tour.exception.ExceptionType;
77
import com.jocketdan.tour.repository.OpenApiPlaceDetailRepository;
8-
import jakarta.persistence.EntityNotFoundException;
98
import lombok.AccessLevel;
109
import lombok.RequiredArgsConstructor;
1110
import lombok.experimental.FieldDefaults;
@@ -53,7 +52,8 @@ public SearchFestivalResponseDTO getSearchFestival(
5352
String arrange,
5453
String lDongRegnCd,
5554
String lDongSignguCd,
56-
String eventStartDate
55+
String eventStartDate,
56+
String eventEndDate
5757
) {
5858
return publicDataApiClient.call(
5959
"/searchFestival2",
@@ -63,7 +63,8 @@ public SearchFestivalResponseDTO getSearchFestival(
6363
"arrange", arrange,
6464
"lDongRegnCd", Objects.toString(lDongRegnCd, ""),
6565
"lDongSignguCd", Objects.toString(lDongSignguCd, ""),
66-
"eventStartDate", eventStartDate
66+
"eventStartDate", eventStartDate,
67+
"eventEndDate", eventEndDate
6768
),
6869
SearchFestivalResponseDTO.class
6970
);

tour/src/main/resources/application.yaml

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,6 @@ springdoc:
4444
path: /v3/api-docs
4545

4646
tour-api:
47-
serviceKey: "cGxNZ8QFaSIQ9kuVB5BO5D0lAVzVRVo7a1OGyq9NURDPayQqPN%2Bts96wy5CjrRCFAXG8A23j7AI0rHALXS20XQ%3D%3D"
47+
serviceKey: "dcbd65ee2233e94d698fc6a8cbef14c314bf73c1be21be24f4e23c6b6eabbfa6"
4848
mobileOs: "WEB"
49-
mobileApp: "TourApp"
50-
51-
app:
52-
jwt:
53-
secret: "StrongKangHeeIsHotguyAndVeryPowerfulLike3000ButHeReallyStupid"
54-
access:
55-
validity: 3600
56-
refresh:
57-
validity: 86400
58-
cookie:
59-
name: refreshToken
60-
path: /
61-
secure: false
62-
sameSite: Lax
63-
64-
redirect-uris:
65-
success:
66-
frontend: http://localhost:3000/oauth2/redirect
67-
failure:
68-
frontend: http://localhost:3000/oauth2/failure
69-
endpoint:
70-
url: /oauth2/redirect
49+
mobileApp: "TourApp"

0 commit comments

Comments
 (0)