-
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.
hotfix: searchQuestion sortingType, tagIds 요청 쿼리스트링 추가
- Loading branch information
Showing
8 changed files
with
76 additions
and
33 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
data/src/main/kotlin/com/kw/data/common/dto/SearchSortingType.kt
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 com.kw.data.common.dto | ||
|
||
enum class SearchSortingType { | ||
// RECOMMENDED, | ||
LATEST, | ||
POPULAR; | ||
|
||
companion object { | ||
fun from(input: String): SearchSortingType { | ||
try { | ||
return SearchSortingType.valueOf(input.uppercase()) | ||
} catch (e: IllegalArgumentException) { | ||
throw IllegalArgumentException("존재하지 않는 정렬 타입입니다: $input") | ||
} | ||
} | ||
} | ||
} |
22 changes: 4 additions & 18 deletions
22
data/src/main/kotlin/com/kw/data/domain/bundle/dto/request/BundleSearchCondition.kt
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,23 +1,9 @@ | ||
package com.kw.data.domain.bundle.dto.request | ||
|
||
import com.kw.data.common.dto.SearchSortingType | ||
|
||
data class BundleSearchCondition( | ||
val sortingType: SortingType?, | ||
val sortingType: SearchSortingType?, | ||
val tagIds: List<Long>?, | ||
val keyword: String? | ||
) { | ||
enum class SortingType { | ||
// RECOMMENDED, | ||
LATEST, | ||
POPULAR; | ||
|
||
companion object { | ||
fun from(input: String): SortingType { | ||
try { | ||
return valueOf(input.uppercase()) | ||
} catch (e: IllegalArgumentException) { | ||
throw IllegalArgumentException("존재하지 않는 정렬 타입입니다: $input") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
) |
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
10 changes: 7 additions & 3 deletions
10
data/src/main/kotlin/com/kw/data/domain/question/dto/QuestionSearchDto.kt
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,11 @@ | ||
package com.kw.infraquerydsl.domain.question.dto | ||
package com.kw.data.domain.question.dto | ||
|
||
import com.kw.data.common.dto.SearchSortingType | ||
|
||
data class QuestionSearchDto( | ||
val sortingType: SearchSortingType?, | ||
val tagIds: List<Long>?, | ||
val keyword: String?, | ||
val page: Long, | ||
val size: Long | ||
val page: Long = 1, | ||
val size: Long = 10 | ||
) |
2 changes: 1 addition & 1 deletion
2
data/src/main/kotlin/com/kw/data/domain/question/repository/QuestionCustomRepository.kt
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
4 changes: 4 additions & 0 deletions
4
server/api/src/main/kotlin/com/kw/api/domain/question/dto/request/QuestionSearchRequest.kt
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