-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[refactor]cursor 기반 page 타입 변경 (#74)
- Loading branch information
Showing
8 changed files
with
98 additions
and
89 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.mjucow.eatda.common.dto | ||
|
||
class CursorPage<T>( | ||
val contents: List<T>, | ||
val hasNext: Boolean, | ||
val nextCursor: String?, | ||
) |
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
6 changes: 2 additions & 4 deletions
6
src/main/kotlin/com/mjucow/eatda/persistence/store/StoreCustomRepository.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,10 +1,8 @@ | ||
package com.mjucow.eatda.persistence.store | ||
|
||
import com.mjucow.eatda.domain.store.entity.Store | ||
import org.springframework.data.domain.Pageable | ||
import org.springframework.data.domain.Slice | ||
|
||
interface StoreCustomRepository { | ||
fun findIdsByCategoryIdOrderByIdDesc(categoryId: Long, page: Pageable, id: Long? = null): Slice<Long> | ||
fun findAllByIdLessThanOrderByIdDesc(page: Pageable, id: Long? = null): Slice<Store> | ||
fun findIdsByCategoryIdOrderByIdDesc(categoryId: Long, size: Int, id: Long? = null): List<Long> | ||
fun findAllByIdLessThanOrderByIdDesc(size: Int, id: Long? = null): List<Store> | ||
} |
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.