last transfer
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
package space.luminic.budgerapp.repos
|
||||
|
||||
import org.springframework.data.mongodb.repository.MongoRepository
|
||||
import space.luminic.budgerapp.models.Recurrent
|
||||
|
||||
interface RecurrentRepoOld : MongoRepository<Recurrent, String>
|
||||
@@ -7,13 +7,14 @@ import org.springframework.stereotype.Repository
|
||||
import space.luminic.budgerapp.models.Recurrent
|
||||
import space.luminic.budgerapp.models.Transaction
|
||||
import space.luminic.budgerapp.models.TransactionType
|
||||
import space.luminic.budgerapp.services.CategoryService
|
||||
import space.luminic.budgerapp.repos.CategoryRepoOld
|
||||
|
||||
|
||||
|
||||
@Repository
|
||||
class RecurrentRepoSQL(
|
||||
private val jdbcTemplate: JdbcTemplate,
|
||||
private val categoryService: CategoryService
|
||||
private val categoryRepoOld: CategoryRepoOld
|
||||
) {
|
||||
private val logger = LoggerFactory.getLogger(RecurrentRepoSQL::class.java)
|
||||
|
||||
@@ -26,7 +27,7 @@ class RecurrentRepoSQL(
|
||||
|
||||
val recurrent = Recurrent(
|
||||
atDay = rs.getInt("at_day"),
|
||||
category = categoryService.getCategoryByName(rs.getString("c_name")).block()!!,
|
||||
category = categoryRepoOld.findByName(rs.getString("c_name"))!!,
|
||||
name = rs.getString("name"),
|
||||
description = rs.getString("description"),
|
||||
amount = rs.getInt("amount")
|
||||
|
||||
Reference in New Issue
Block a user