-
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.
- Loading branch information
1 parent
9294c06
commit 9f4e422
Showing
2 changed files
with
64 additions
and
3 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
domain/src/main/java/com/susu/domain/usecase/envelope/SearchSentEnvelopeListUseCase.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,31 @@ | ||
package com.susu.domain.usecase.envelope | ||
|
||
import com.susu.core.common.runCatchingIgnoreCancelled | ||
import com.susu.domain.repository.EnvelopesRepository | ||
import javax.inject.Inject | ||
|
||
class SearchSentEnvelopeListUseCase @Inject constructor( | ||
private val envelopesRepository: EnvelopesRepository, | ||
) { | ||
suspend operator fun invoke(param: Param) = runCatchingIgnoreCancelled { | ||
with(param) { | ||
envelopesRepository.searchEnvelope( | ||
friendIds = friendIds, | ||
types = "SENT", | ||
fromAmount = fromAmount, | ||
toAmount = toAmount, | ||
page = page, | ||
sort = sort, | ||
ledgerId = null, | ||
) | ||
} | ||
} | ||
|
||
data class Param( | ||
val friendIds: List<Int>? = null, | ||
val fromAmount: Long? = null, | ||
val toAmount: Long? = null, | ||
val page: Int? = null, | ||
val sort: String? = null, | ||
) | ||
} |
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