-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [feat] make request and response dto * [feat] logic for validation of adding store * [refac] add missing transational annotation * [feat] set two-way association * [feat] add universityId in request * [feat] add university id condition * [feat] delete unnecessary logic * [refac] delete unnecessary import * [feat] dto for response * [feat] logic for get user hearted stores view * [refac] rename field of dto * [refac] add validation and fix typing missing * [feat] reflect sorting order * [refac] delete unnecessary blank and imports * [feat] logic for validate registered store * [feat] logic for validate already registered store * [feat] update server-yml * [feat] logic for creat fail response * [refac] change the optional return value to boolean * [refac] reaname response dto * [refac] modify exception situation response * [refac] divide method
- Loading branch information
Showing
22 changed files
with
110 additions
and
28 deletions.
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