-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix/select query #24
Merged
Merged
Fix/select query #24
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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
This file contains 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
19 changes: 19 additions & 0 deletions
19
api/src/main/java/com/walking/api/domain/path/dto/CalculatePathFavoritesTimeUseCaseIn.java
This file contains 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,19 @@ | ||
package com.walking.api.domain.path.dto; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@ToString | ||
@EqualsAndHashCode | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Builder | ||
public class CalculatePathFavoritesTimeUseCaseIn { | ||
private Long favoritesPathId; | ||
} |
33 changes: 33 additions & 0 deletions
33
api/src/main/java/com/walking/api/domain/path/dto/CalculatePathFavoritesTimeUseCaseOut.java
This file contains 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,33 @@ | ||
package com.walking.api.domain.path.dto; | ||
|
||
import com.walking.api.domain.traffic.dto.detail.PointDetail; | ||
import com.walking.api.domain.traffic.dto.detail.TrafficDetail; | ||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@ToString | ||
@EqualsAndHashCode | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Builder | ||
public class CalculatePathFavoritesTimeUseCaseOut { | ||
private LocalDateTime nowTime; | ||
private Integer totalTime; | ||
private Integer trafficCount; | ||
private List<LocalDateTime> departureTimes; | ||
private Integer timeToFirstTraffic; | ||
private Integer totalDistance; | ||
private PointDetail startPoint; | ||
private PointDetail endPoint; | ||
private List<TrafficDetail> traffics; | ||
private List<Long> trafficIdsInPath; | ||
private List<PointDetail> paths; | ||
} |
22 changes: 22 additions & 0 deletions
22
api/src/main/java/com/walking/api/domain/path/dto/CalculatePathTimeUseCaseIn.java
This file contains 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,22 @@ | ||
package com.walking.api.domain.path.dto; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@ToString | ||
@EqualsAndHashCode | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Builder | ||
public class CalculatePathTimeUseCaseIn { | ||
private Double startLat; | ||
private Double startLng; | ||
private Double endLat; | ||
private Double endLng; | ||
} |
33 changes: 33 additions & 0 deletions
33
api/src/main/java/com/walking/api/domain/path/dto/CalculatePathTimeUseCaseOut.java
This file contains 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,33 @@ | ||
package com.walking.api.domain.path.dto; | ||
|
||
import com.walking.api.domain.traffic.dto.detail.PointDetail; | ||
import com.walking.api.domain.traffic.dto.detail.TrafficDetail; | ||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@ToString | ||
@EqualsAndHashCode | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Builder | ||
public class CalculatePathTimeUseCaseOut { | ||
private LocalDateTime nowTime; | ||
private Integer totalTime; | ||
private Integer trafficCount; | ||
private List<LocalDateTime> departureTimes; | ||
private Integer timeToFirstTraffic; | ||
private Integer totalDistance; | ||
private PointDetail startPoint; | ||
private PointDetail endPoint; | ||
private List<TrafficDetail> traffics; | ||
private List<Long> trafficIdsInPath; | ||
private List<PointDetail> paths; | ||
} |
20 changes: 20 additions & 0 deletions
20
api/src/main/java/com/walking/api/domain/path/dto/DeleteFavoriteRouteUseCaseIn.java
This file contains 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,20 @@ | ||
package com.walking.api.domain.path.dto; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@ToString | ||
@EqualsAndHashCode | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Builder | ||
public class DeleteFavoriteRouteUseCaseIn { | ||
private Long memberId; | ||
private Long pathId; | ||
} |
13 changes: 0 additions & 13 deletions
13
api/src/main/java/com/walking/api/domain/path/dto/PathPrimaryData.java
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
api/src/main/java/com/walking/api/domain/path/dto/ReadFavoritesPathUseCaseIn.java
This file contains 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,26 @@ | ||
package com.walking.api.domain.path.dto; | ||
|
||
import com.walking.api.web.dto.request.OrderFilter; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@ToString | ||
@EqualsAndHashCode | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Builder | ||
public class ReadFavoritesPathUseCaseIn { | ||
private Long memberId; | ||
private String name; | ||
private OrderFilter orderFilter; | ||
|
||
public boolean isOrderFiltered() { | ||
return orderFilter != null; | ||
} | ||
} |
This file contains 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 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 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 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.
주어진 코드 패치는 좋아 보입니다. 개선을 제안하자면 'traffic' 컬럼과 'timeLeftRegDt' 컬럼에 대한 정확한 조인 조건이 필요합니다. 현재의 쿼리는 서브쿼리를 사용하여 가장 최근 데이터를 찾습니다. 그러나 성능 개선을 위해 인덱스를 고려할 수 있습니다. 또한 주석을 추가하여 쿼리를 설명하는 것이 도움이 될 수 있습니다.