-
Notifications
You must be signed in to change notification settings - Fork 30
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
90be7d3
commit 97750a7
Showing
21 changed files
with
228 additions
and
190 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
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
5 changes: 3 additions & 2 deletions
5
...opex/wallet/core/inout/BankDataCommand.kt → ...opex/wallet/core/inout/TerminalCommand.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,11 @@ | ||
package co.nilin.opex.wallet.core.inout | ||
|
||
data class BankDataCommand( | ||
data class TerminalCommand( | ||
var uuid: String?, | ||
var owner: String, | ||
var identifier: String, | ||
var active: Boolean? = true, | ||
var type: TransferMethod, | ||
var bankSwiftCode: String | ||
var metaData: String, | ||
var description : String? | ||
) |
2 changes: 1 addition & 1 deletion
2
wallet/wallet-core/src/main/kotlin/co/nilin/opex/wallet/core/inout/TransferMethod.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,5 +1,5 @@ | ||
package co.nilin.opex.wallet.core.inout | ||
|
||
enum class TransferMethod { | ||
CARD, SHEBA, IPG, OPEX | ||
CARD, SHEBA, IPG, EXCHANGE | ||
} |
12 changes: 0 additions & 12 deletions
12
wallet/wallet-core/src/main/kotlin/co/nilin/opex/wallet/core/spi/BankDataManager.kt
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
wallet/wallet-core/src/main/kotlin/co/nilin/opex/wallet/core/spi/GatewayBankDataManager.kt
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
wallet/wallet-core/src/main/kotlin/co/nilin/opex/wallet/core/spi/GatewayTerminalManager.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,12 @@ | ||
package co.nilin.opex.wallet.core.spi | ||
|
||
import co.nilin.opex.wallet.core.inout.TerminalCommand | ||
|
||
interface GatewayTerminalManager { | ||
suspend fun assignTerminalToGateway(gatewayUuid: String, terminal: List<String>) | ||
|
||
suspend fun getAssignedTerminalToGateway(gatewayUuid: String): List<TerminalCommand>? | ||
|
||
suspend fun revokeTerminalToGateway(gatewayUuid: String, terminal: List<String>) | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
wallet/wallet-core/src/main/kotlin/co/nilin/opex/wallet/core/spi/TerminalManager.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,12 @@ | ||
package co.nilin.opex.wallet.core.spi | ||
|
||
import co.nilin.opex.wallet.core.inout.TerminalCommand | ||
|
||
interface TerminalManager { | ||
|
||
suspend fun save(terminalCommand: TerminalCommand): TerminalCommand? | ||
suspend fun update(terminalCommand: TerminalCommand): TerminalCommand? | ||
suspend fun delete(uuid: String) | ||
suspend fun fetchTerminal(): List<TerminalCommand>? | ||
suspend fun fetchTerminal(uuid: String): TerminalCommand? | ||
} |
14 changes: 0 additions & 14 deletions
14
...er-postgres/src/main/kotlin/co/nilin/opex/wallet/ports/postgres/dao/BankDataRepository.kt
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
...gres/src/main/kotlin/co/nilin/opex/wallet/ports/postgres/dao/GatewayBankDataRepository.kt
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
...gres/src/main/kotlin/co/nilin/opex/wallet/ports/postgres/dao/GatewayTerminalRepository.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,18 @@ | ||
package co.nilin.opex.wallet.ports.postgres.dao | ||
|
||
import co.nilin.opex.wallet.ports.postgres.model.TerminalModel | ||
import co.nilin.opex.wallet.ports.postgres.model.GatewayTerminalModel | ||
import org.springframework.data.r2dbc.repository.Query | ||
import org.springframework.data.repository.reactive.ReactiveCrudRepository | ||
import org.springframework.stereotype.Repository | ||
import reactor.core.publisher.Flux | ||
import reactor.core.publisher.Mono | ||
|
||
@Repository | ||
interface GatewayTerminalRepository : ReactiveCrudRepository<GatewayTerminalModel, Long> { | ||
|
||
fun deleteByTerminalIdAndGatewayId(terminalId: Long, gatewayId: Long): Mono<Void> | ||
|
||
@Query("select b.* from gateway_terminal gt join terminal t on gt.terminal_id=t.id where gt.gateway_id=:gatewayId ") | ||
fun findByGatewayId(gatewayId: Long): Flux<TerminalModel>? | ||
} |
14 changes: 14 additions & 0 deletions
14
...er-postgres/src/main/kotlin/co/nilin/opex/wallet/ports/postgres/dao/TerminalRepository.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,14 @@ | ||
package co.nilin.opex.wallet.ports.postgres.dao | ||
|
||
import co.nilin.opex.wallet.ports.postgres.model.TerminalModel | ||
import org.springframework.data.repository.reactive.ReactiveCrudRepository | ||
import org.springframework.stereotype.Repository | ||
import reactor.core.publisher.Mono | ||
|
||
@Repository | ||
interface TerminalRepository : ReactiveCrudRepository<TerminalModel, Long> { | ||
fun findByIdentifier(identifier: String): Mono<TerminalModel>? | ||
fun findByUuid(uuid: String): Mono<TerminalModel>? | ||
|
||
|
||
} |
53 changes: 0 additions & 53 deletions
53
...-postgres/src/main/kotlin/co/nilin/opex/wallet/ports/postgres/impl/BankDataManagerImpl.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.