-
Notifications
You must be signed in to change notification settings - Fork 1
[release] 진행 상황을 main으로 머지 #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
ac36f55
[test] 테스트코드에서 리뷰 등록 시 리뷰 카운트 증가 타입 변경
seung-in-Yoo d022f97
[feat] 웨이블존 일치 여부 검증 알고리즘 성능 개선
KiSeungMin e6ce328
[feat] 웨이블존 일치 여부 검증 알고리즘 성능 개선
KiSeungMin 1073d2f
[refactor] 디렉토리 변경
hyoinYang 06d3484
[feat] 엘리베이터 정보 반영
hyoinYang 6759d72
Merge remote-tracking branch 'origin/develop' into feature/hyoin
hyoinYang a2a98e2
[fix] 출구 번호 출력시 정렬 추가
hyoinYang 0d51d0a
[fix] 함수 파라미터 수젖ㅇ
hyoinYang d897d30
Revert "[fix] 함수 파라미터 수젖ㅇ"
hyoinYang d8dc03c
[fix] 함수 파라미터 수정
hyoinYang bf997fc
Merge pull request #166 from Wayble-Project/feature/hyoin
hyoinYang ce61e36
[refactor] 리졸버에서 토큰으로 꺼내도록 변경
seung-in-Yoo b44069f
[refactor] swagger에서 필수 파라미터 userId 입력 삭제
seung-in-Yoo 47b3255
[feat] Auth (리졸버) 관련 에러케이스 추가
seung-in-Yoo 3faefa3
[refactor] 리졸버 관련 예외처리 변경
seung-in-Yoo 67a5faa
[refactor] 코드리뷰 반영
seung-in-Yoo cba4d8e
Merge pull request #169 from Wayble-Project/feature/seungin
seung-in-Yoo 8503d61
[refactor] Auth errorCode 숫자 변경
seung-in-Yoo 3e37fa9
[feat] 웨이블존 저장할 리스트 생성 관련 요청 Dto 생성
seung-in-Yoo 6bcd32b
[feat] 웨이블존 저장할 리스트 생성 관련 응답 Dto 생성
seung-in-Yoo a9b7c9a
[feat] 리스트에 웨이블존 추가 요청 DTO 생성
seung-in-Yoo aec33b8
[refactor] 웨이블존 추가 리스트 관련 에러 케이스 추가
seung-in-Yoo c288b5b
[refactor] 웨이블존 저장 관련 서비스 로직 변경
seung-in-Yoo 2fbb794
[refactor] 웨이블존 저장 관련 Dto 필드명 변경
seung-in-Yoo 9700c53
[fix] 웨이블존 저장 관련 컨트롤러 로직 변경
seung-in-Yoo 823d51b
Merge pull request #171 from Wayble-Project/feature/seungin
seung-in-Yoo 4798b27
[fix] 오프바이원 버그 관련 수정
seung-in-Yoo e11cbca
[refactor] 코드리뷰 반영
seung-in-Yoo fc63e8f
[refactor] 페이징 관련 서비스 로직에 따라 컨트롤러도 정규화한 값으로 사용
seung-in-Yoo 697aaa5
[refactor] UserPlaceController에 @validated 추가
seung-in-Yoo 15b9363
Merge pull request #172 from Wayble-Project/feature/seungin
seung-in-Yoo f725de5
[refactor] 웨이블존 저장 및 조회 관련 swagger 이름 변경
seung-in-Yoo b1df4ea
[fix] 하나의 웨이블존에 여러개의 리스트를 저장하도록 로직 변경
seung-in-Yoo 76198c7
[refactor] 핸들러 메서드명 의미에 맞게 변경
seung-in-Yoo 89b5995
[refactor] 코드리뷰 반영
seung-in-Yoo fa9f0f8
[fix] 페이지 관련 0 -> 1 로 변경
seung-in-Yoo 3fe1ea9
Merge pull request #173 from Wayble-Project/feature/seungin
seung-in-Yoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
src/main/java/com/wayble/server/auth/exception/AuthErrorCase.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| package com.wayble.server.auth.exception; | ||
|
|
||
| import com.wayble.server.common.exception.ErrorCase; | ||
| import lombok.Getter; | ||
| import lombok.RequiredArgsConstructor; | ||
|
|
||
| @Getter | ||
| @RequiredArgsConstructor | ||
| public enum AuthErrorCase implements ErrorCase { | ||
| UNAUTHORIZED(401, 7001, "인증 정보가 없거나 userId를 추출할 수 없습니다."); | ||
|
|
||
| private final Integer httpStatusCode; | ||
| private final Integer errorCode; | ||
| private final String message; | ||
| } |
54 changes: 37 additions & 17 deletions
54
src/main/java/com/wayble/server/auth/resolver/CurrentUserArgumentResolver.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,45 +1,65 @@ | ||
| package com.wayble.server.auth.resolver; | ||
|
|
||
| import com.wayble.server.auth.exception.AuthErrorCase; | ||
| import com.wayble.server.common.config.security.jwt.JwtTokenProvider; | ||
| import com.wayble.server.common.exception.ApplicationException; | ||
| import jakarta.servlet.http.HttpServletRequest; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.springframework.core.MethodParameter; | ||
| import org.springframework.security.core.Authentication; | ||
| import org.springframework.security.core.context.SecurityContextHolder; | ||
| import org.springframework.stereotype.Component; | ||
| import org.springframework.util.StringUtils; | ||
| import org.springframework.web.bind.support.WebDataBinderFactory; | ||
| import org.springframework.web.context.request.NativeWebRequest; | ||
| import org.springframework.web.method.support.HandlerMethodArgumentResolver; | ||
| import org.springframework.web.method.support.ModelAndViewContainer; | ||
|
|
||
| @Component | ||
| @RequiredArgsConstructor | ||
| public class CurrentUserArgumentResolver implements HandlerMethodArgumentResolver { | ||
|
|
||
| private final JwtTokenProvider jwtTokenProvider; | ||
|
|
||
| @Override | ||
| public boolean supportsParameter(MethodParameter parameter) { | ||
| return parameter.hasParameterAnnotation(CurrentUser.class) | ||
| && Long.class.equals(parameter.getParameterType()); | ||
| } | ||
|
|
||
| @Override | ||
| public Object resolveArgument(MethodParameter parameter, | ||
| ModelAndViewContainer mav, | ||
| NativeWebRequest webRequest, | ||
| WebDataBinderFactory binderFactory) { | ||
| public Object resolveArgument( | ||
| MethodParameter parameter, | ||
| ModelAndViewContainer mav, | ||
| NativeWebRequest webRequest, | ||
| WebDataBinderFactory binderFactory | ||
| ) { | ||
| Authentication auth = SecurityContextHolder.getContext().getAuthentication(); | ||
| if (auth == null) { | ||
| throw new IllegalStateException("인증 정보가 없습니다."); | ||
| if (auth != null) { | ||
| Object principal = auth.getPrincipal(); | ||
| if (principal instanceof Long l) { return l; } | ||
| if (principal instanceof Integer i) { return i.longValue(); } | ||
| if (principal instanceof String s && s.chars().allMatch(Character::isDigit)) { | ||
| return Long.parseLong(s); | ||
| } | ||
| String name = auth.getName(); | ||
| if (name != null && name.chars().allMatch(Character::isDigit)) { | ||
| return Long.parseLong(name); | ||
| } | ||
| } | ||
|
|
||
| Object principal = auth.getPrincipal(); | ||
| if (principal instanceof Long l) return l; | ||
| if (principal instanceof Integer i) return i.longValue(); | ||
| if (principal instanceof String s) { | ||
| HttpServletRequest request = webRequest.getNativeRequest(HttpServletRequest.class); | ||
| String authz = request != null ? request.getHeader("Authorization") : null; | ||
| if (StringUtils.hasText(authz) && authz.startsWith("Bearer ")) { | ||
| String token = authz.substring(7); | ||
| try { | ||
| return Long.parseLong(s); | ||
| } catch (NumberFormatException ignored) {} | ||
| } | ||
| try { | ||
| return Long.parseLong(auth.getName()); | ||
| } catch (Exception e) { | ||
| throw new IllegalStateException("userId를 추출할 수 없습니다.", e); | ||
| Long userId = jwtTokenProvider.getUserId(token); | ||
| if (userId != null) { return userId; } | ||
| } catch (IllegalArgumentException e) { | ||
| throw new ApplicationException(AuthErrorCase.UNAUTHORIZED); | ||
| } | ||
| } | ||
|
|
||
| throw new ApplicationException(AuthErrorCase.UNAUTHORIZED); | ||
| } | ||
| } |
4 changes: 3 additions & 1 deletion
4
src/main/java/com/wayble/server/direction/dto/response/TransportationResponseDto.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/com/wayble/server/direction/entity/transportation/Edge.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/com/wayble/server/direction/entity/transportation/Route.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...erver/direction/entity/DirectionType.java → .../direction/entity/type/DirectionType.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/main/java/com/wayble/server/direction/repository/ElevatorRepository.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| package com.wayble.server.direction.repository; | ||
|
|
||
| import com.wayble.server.direction.entity.transportation.Elevator; | ||
| import com.wayble.server.direction.entity.transportation.Facility; | ||
| import org.springframework.data.jpa.repository.JpaRepository; | ||
| import org.springframework.data.jpa.repository.Query; | ||
| import org.springframework.data.repository.query.Param; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| public interface ElevatorRepository extends JpaRepository<Elevator, Long> { | ||
| @Query("SELECT e FROM Elevator e WHERE e.facility = :facility") | ||
| List<Elevator> findByFacility(@Param("facility") Facility facility); | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
위치 스키마 변경(DB 마이그레이션/레거시 사용처 점검 필요)
latitude/longitude → location 문자열 변경에 따라:
elevator.getLatitude()/getLongitude()참조가 남아있지 않은지 점검 필요확인을 위해 아래 스크립트로 레거시 사용처와 마이그레이션 흔적을 점검해 주세요. 결과 공유해 주시면 후속 지원하겠습니다.
🏁 Script executed:
Length of output: 22107
DB 스키마 변경(엘리베이터 location 전환) 마이그레이션 및 레거시 호출 점검 필요
아래 사항을 반드시 반영/확인해주세요:
latitude/longitude→location문자열 전환을 위한 Flyway/Liquibase 마이그레이션 스크립트 추가location으로 이관(migrate)elevator.getLatitude()/elevator.getLongitude()호출이 남아있지 않은지 재차 검증src/main/resources/db/migration(또는 프로젝트 설정된 폴더)에 위치시키고, 자동 배포 파이프라인에 포함위 작업 완료 후 결과(스크립트·검증 로그)를 공유해주시면 최종 승인 및 후속 지원을 진행하겠습니다.
🤖 Prompt for AI Agents