From 24879206d6ca680ee8ffc2c04eba5e3d7f60630e Mon Sep 17 00:00:00 2001 From: Hongwei Date: Tue, 29 Apr 2025 13:34:17 +0200 Subject: [PATCH 1/4] refactor/update error logging message for glossary file check for clarity --- obp-api/src/main/scala/code/api/util/Glossary.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obp-api/src/main/scala/code/api/util/Glossary.scala b/obp-api/src/main/scala/code/api/util/Glossary.scala index 8b1a84d39e..a870d6329b 100644 --- a/obp-api/src/main/scala/code/api/util/Glossary.scala +++ b/obp-api/src/main/scala/code/api/util/Glossary.scala @@ -3525,7 +3525,7 @@ object Glossary extends MdcLoggable { .filter(_.getName.endsWith(".md")) .toList } else { - logger.error(s"Do not have any files under glossary path ($glossaryPath), please double check the folder: obp-api/src/main/resources/docs/glossary") + logger.error(s"There are no glossary files under the path ($glossaryPath), please double check the folder: obp-api/src/main/resources/docs/glossary") List.empty[File] } } From 0927e3a4b15d1fc0184249d27a23855b712dece6 Mon Sep 17 00:00:00 2001 From: Hongwei Date: Fri, 2 May 2025 11:48:48 +0200 Subject: [PATCH 2/4] refactor/update BankAccountBalance to use KeyedMapper for improved key handling --- .../scala/code/bankaccountbalance/BankAccountBalance.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/obp-api/src/main/scala/code/bankaccountbalance/BankAccountBalance.scala b/obp-api/src/main/scala/code/bankaccountbalance/BankAccountBalance.scala index 5f6e0712c4..68443de9d0 100644 --- a/obp-api/src/main/scala/code/bankaccountbalance/BankAccountBalance.scala +++ b/obp-api/src/main/scala/code/bankaccountbalance/BankAccountBalance.scala @@ -8,10 +8,13 @@ import net.liftweb.mapper._ import net.liftweb.util.Helpers.tryo -class BankAccountBalance extends BankAccountBalanceTrait with LongKeyedMapper[BankAccountBalance] with CreatedUpdated with IdPK { +class BankAccountBalance extends BankAccountBalanceTrait with KeyedMapper[String, BankAccountBalance]{ override def getSingleton = BankAccountBalance + // Define BalanceId_ as the primary key + override def primaryKeyField = BalanceId_.asInstanceOf[KeyedMetaMapper[String, BankAccountBalance]].primaryKeyField + object BankId_ extends MappedUUID(this) object AccountId_ extends MappedUUID(this) object BalanceId_ extends MappedUUID(this) @@ -33,4 +36,4 @@ class BankAccountBalance extends BankAccountBalanceTrait with LongKeyedMapper[Ba override def balanceAmount: BigDecimal = Helper.smallestCurrencyUnitToBigDecimal(BalanceAmount.get, foreignMappedBankAccountCurrency) } -object BankAccountBalance extends BankAccountBalance with LongKeyedMetaMapper[BankAccountBalance] {} +object BankAccountBalance extends BankAccountBalance with KeyedMetaMapper[String, BankAccountBalance] with CreatedUpdated {} From b5df2215ea448be6d2414749e46ed20913b767c0 Mon Sep 17 00:00:00 2001 From: Hongwei Date: Fri, 2 May 2025 13:34:33 +0200 Subject: [PATCH 3/4] refactor/update error logging message for glossary file check for clarity # Conflicts: # obp-api/src/main/scala/code/api/util/Glossary.scala --- obp-api/src/main/scala/code/api/util/Glossary.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obp-api/src/main/scala/code/api/util/Glossary.scala b/obp-api/src/main/scala/code/api/util/Glossary.scala index f14837a1f7..9507cc101b 100644 --- a/obp-api/src/main/scala/code/api/util/Glossary.scala +++ b/obp-api/src/main/scala/code/api/util/Glossary.scala @@ -3534,7 +3534,7 @@ object Glossary extends MdcLoggable { .filter(_.getName.endsWith(".md")) .toList } else { - logger.error(s"Do not have any files under glossary path ($glossaryPath), please double check the folder path: $glossaryPath") + logger.error(s"There are no glossary files under the path ($glossaryPath), please double check the folder path: $glossaryPath") List.empty[File] } } From 239cf64c195f32c6bf7669554ece03e5c81b1e13 Mon Sep 17 00:00:00 2001 From: Hongwei Date: Fri, 2 May 2025 11:48:48 +0200 Subject: [PATCH 4/4] refactor/update BankAccountBalance to use KeyedMapper for improved key handling --- .../scala/code/bankaccountbalance/BankAccountBalance.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/obp-api/src/main/scala/code/bankaccountbalance/BankAccountBalance.scala b/obp-api/src/main/scala/code/bankaccountbalance/BankAccountBalance.scala index 5f6e0712c4..68443de9d0 100644 --- a/obp-api/src/main/scala/code/bankaccountbalance/BankAccountBalance.scala +++ b/obp-api/src/main/scala/code/bankaccountbalance/BankAccountBalance.scala @@ -8,10 +8,13 @@ import net.liftweb.mapper._ import net.liftweb.util.Helpers.tryo -class BankAccountBalance extends BankAccountBalanceTrait with LongKeyedMapper[BankAccountBalance] with CreatedUpdated with IdPK { +class BankAccountBalance extends BankAccountBalanceTrait with KeyedMapper[String, BankAccountBalance]{ override def getSingleton = BankAccountBalance + // Define BalanceId_ as the primary key + override def primaryKeyField = BalanceId_.asInstanceOf[KeyedMetaMapper[String, BankAccountBalance]].primaryKeyField + object BankId_ extends MappedUUID(this) object AccountId_ extends MappedUUID(this) object BalanceId_ extends MappedUUID(this) @@ -33,4 +36,4 @@ class BankAccountBalance extends BankAccountBalanceTrait with LongKeyedMapper[Ba override def balanceAmount: BigDecimal = Helper.smallestCurrencyUnitToBigDecimal(BalanceAmount.get, foreignMappedBankAccountCurrency) } -object BankAccountBalance extends BankAccountBalance with LongKeyedMetaMapper[BankAccountBalance] {} +object BankAccountBalance extends BankAccountBalance with KeyedMetaMapper[String, BankAccountBalance] with CreatedUpdated {}