diff --git a/services/payments/src/main/java/com/workup/payments/commands/wallettransaction/GetWalletTransactionsCommand.java b/services/payments/src/main/java/com/workup/payments/commands/wallettransaction/GetWalletTransactionsCommand.java index b833f8a0..6f64d412 100644 --- a/services/payments/src/main/java/com/workup/payments/commands/wallettransaction/GetWalletTransactionsCommand.java +++ b/services/payments/src/main/java/com/workup/payments/commands/wallettransaction/GetWalletTransactionsCommand.java @@ -17,7 +17,7 @@ public class GetWalletTransactionsCommand @Override public GetWalletTransactionsResponse Run(GetWalletTransactionsRequest request) { - if (getWalletRepository().existsById(request.getFreelancerId())) { + if (!getWalletRepository().existsById(request.getFreelancerId())) { return GetWalletTransactionsResponse.builder() .withStatusCode(HttpStatusCode.BAD_REQUEST) .withErrorMessage("Wallet does not exist") diff --git a/services/payments/src/main/resources/application.properties b/services/payments/src/main/resources/application.properties index b125cb1f..c0355faf 100644 --- a/services/payments/src/main/resources/application.properties +++ b/services/payments/src/main/resources/application.properties @@ -2,7 +2,7 @@ spring.application.name=payments spring.datasource.url=${PAYMENTS_DB_URL} spring.datasource.username=payments_user spring.datasource.password=payments_password -spring.jpa.hibernate.ddl-auto=create-drop +spring.jpa.hibernate.ddl-auto=create-only spring.jpa.show-sql=true spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect spring.jpa.properties.hibernate.format_sql=true @@ -14,3 +14,8 @@ spring.rabbitmq.username=guest spring.rabbitmq.password=guest logging.level.root=INFO + +spring.cache.type=redis +spring.cache.host=service_redis +spring.cache.port=6379 +spring.cache.redis.time-to-live=600000 \ No newline at end of file