-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #215 from ttoklip/Feat/28-소통해요-함께공구해요-시-구-동으로-구분
feat: 소통해요 페이징 조회시 같은 지역으로 필터링. 시, 구, 동으로 구분 (#214)
- Loading branch information
Showing
7 changed files
with
124 additions
and
21 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/main/java/com/api/ttoklip/domain/town/TownCriteria.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,28 @@ | ||
package com.api.ttoklip.domain.town; | ||
|
||
import com.api.ttoklip.global.exception.ApiException; | ||
import com.api.ttoklip.global.exception.ErrorType; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
@Slf4j | ||
@RequiredArgsConstructor | ||
public enum TownCriteria { | ||
|
||
CITY("시"), | ||
DISTRICT("구"), | ||
TOWN("동"), | ||
|
||
; | ||
|
||
private final String Criteria; | ||
|
||
public static TownCriteria findTownCriteriaByValue(final String value) { | ||
try { | ||
return TownCriteria.valueOf(value.trim().toUpperCase()); | ||
} catch (IllegalArgumentException e) { | ||
log.error("Invalid value for TownCriteria: {}", value); | ||
throw new ApiException(ErrorType.INVALID_SORT_TYPE); | ||
} | ||
} | ||
} |
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
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