-
Notifications
You must be signed in to change notification settings - Fork 0
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
[feat] 이미 등록된 식당인지 판별하는 API #72
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
f965c9e
[feat] make request and response dto
kgy1008 fb537df
[feat] logic for validation of adding store
kgy1008 2c41deb
[refac] add missing transational annotation
kgy1008 d4077e0
[feat] set two-way association
kgy1008 bf8d8b8
[feat] add universityId in request
kgy1008 f71b5e5
[feat] add university id condition
kgy1008 fb713aa
[feat] delete unnecessary logic
kgy1008 13efe25
[refac] delete unnecessary import
kgy1008 75f870c
[feat] dto for response
kgy1008 cce17c9
[feat] logic for get user hearted stores view
kgy1008 4fdd950
[refac] rename field of dto
kgy1008 f0239f6
[refac] add validation and fix typing missing
kgy1008 fffb250
[feat] reflect sorting order
kgy1008 9c6bbc9
[refac] delete unnecessary blank and imports
kgy1008 db0e3d4
[feat] logic for validate registered store
kgy1008 26e7852
[feat] logic for validate already registered store
kgy1008 adac925
[feat] update server-yml
kgy1008 d5e0c7d
[feat] logic for creat fail response
kgy1008 245c8ad
[refac] change the optional return value to boolean
kgy1008 759192e
[refac] reaname response dto
kgy1008 b0478ba
[refac] modify exception situation response
kgy1008 120b83b
[refac] divide method
kgy1008 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
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
2 changes: 2 additions & 0 deletions
2
src/main/java/org/hankki/hankkiserver/api/auth/controller/request/UserLoginRequest.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 |
---|---|---|
@@ -1,10 +1,12 @@ | ||
package org.hankki.hankkiserver.api.auth.controller.request; | ||
|
||
import jakarta.annotation.Nullable; | ||
import jakarta.validation.constraints.NotNull; | ||
|
||
public record UserLoginRequest( | ||
@Nullable | ||
String name, | ||
@NotNull | ||
String platform | ||
) { | ||
} |
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
8 changes: 8 additions & 0 deletions
8
...org/hankki/hankkiserver/api/store/controller/request/StoreDuplicateValidationRequest.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,8 @@ | ||
package org.hankki.hankkiserver.api.store.controller.request; | ||
|
||
public record StoreDuplicateValidationRequest( | ||
long universityId, | ||
double latitude, | ||
double longitude | ||
) { | ||
} |
3 changes: 0 additions & 3 deletions
3
src/main/java/org/hankki/hankkiserver/api/store/service/HeartFinder.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
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
17 changes: 17 additions & 0 deletions
17
src/main/java/org/hankki/hankkiserver/api/store/service/UniversityStoreFinder.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,17 @@ | ||
package org.hankki.hankkiserver.api.store.service; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import org.hankki.hankkiserver.domain.store.model.Store; | ||
import org.hankki.hankkiserver.domain.universitystore.repository.UniversityStoreRepository; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
@RequiredArgsConstructor | ||
public class UniversityStoreFinder { | ||
|
||
private final UniversityStoreRepository universityStoreRepository; | ||
|
||
protected boolean existsByUniversityIdAndStore(final Long universityId, final Store store) { | ||
return universityStoreRepository.existsByUniversityIdAndStore(universityId, store); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/org/hankki/hankkiserver/api/store/service/command/StoreValidationCommand.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,13 @@ | ||
package org.hankki.hankkiserver.api.store.service.command; | ||
|
||
import org.hankki.hankkiserver.api.store.controller.request.StoreDuplicateValidationRequest; | ||
|
||
public record StoreValidationCommand ( | ||
long universityId, | ||
double latitude, | ||
double longitude | ||
) { | ||
public static StoreValidationCommand of(StoreDuplicateValidationRequest request) { | ||
return new StoreValidationCommand(request.universityId(), request.latitude(), request.longitude()); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
.../java/org/hankki/hankkiserver/api/store/service/response/StoreDuplicateErrorResponse.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,6 @@ | ||
package org.hankki.hankkiserver.api.store.service.response; | ||
|
||
public record StoreDuplicateErrorResponse( | ||
Long storeId | ||
) { | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,5 +38,4 @@ public static final Heart createHeart(User user, Store store) { | |
.store(store) | ||
.build(); | ||
} | ||
|
||
} |
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
2 changes: 0 additions & 2 deletions
2
src/main/java/org/hankki/hankkiserver/domain/store/model/StoreCategory.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
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
3 changes: 3 additions & 0 deletions
3
.../org/hankki/hankkiserver/domain/universitystore/repository/UniversityStoreRepository.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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
package org.hankki.hankkiserver.domain.universitystore.repository; | ||
|
||
import org.hankki.hankkiserver.domain.store.model.Store; | ||
import org.hankki.hankkiserver.domain.universitystore.model.UniversityStore; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface UniversityStoreRepository extends JpaRepository<UniversityStore, Long> { | ||
|
||
boolean existsByUniversityIdAndStore(Long universityId, Store store); | ||
} |
1 change: 0 additions & 1 deletion
1
src/main/java/org/hankki/hankkiserver/domain/user/model/UserInfo.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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
package org.hankki.hankkiserver.domain.user.model; | ||
|
||
|
||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
|
1 change: 0 additions & 1 deletion
1
src/main/java/org/hankki/hankkiserver/domain/user/repository/UserInfoRepository.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
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.
현재 받아야하는 문자열이 KAKAO 혹은 APPLE이니 null과 더불어 빈 문자열을 검색하는 @notblank로 하는게 어떨까요?