diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanApplicationModifiedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanApplicationModifiedBusinessEvent.java new file mode 100644 index 000000000..ceeffde7a --- /dev/null +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanApplicationModifiedBusinessEvent.java @@ -0,0 +1,35 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.event.business.domain.loan; + +import org.apache.fineract.portfolio.loanaccount.domain.Loan; + +public class LoanApplicationModifiedBusinessEvent extends LoanBusinessEvent { + + private static final String TYPE = "LoanApplicationModifiedBusinessEvent"; + + public LoanApplicationModifiedBusinessEvent(Loan value) { + super(value); + } + + @Override + public String getType() { + return TYPE; + } +} diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanWithdrawnByApplicantBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanWithdrawnByApplicantBusinessEvent.java new file mode 100644 index 000000000..0f71121e5 --- /dev/null +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanWithdrawnByApplicantBusinessEvent.java @@ -0,0 +1,35 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.event.business.domain.loan; + +import org.apache.fineract.portfolio.loanaccount.domain.Loan; + +public class LoanWithdrawnByApplicantBusinessEvent extends LoanBusinessEvent { + + private static final String TYPE = "LoanWithdrawnByApplicantBusinessEvent"; + + public LoanWithdrawnByApplicantBusinessEvent(Loan value) { + super(value); + } + + @Override + public String getType() { + return TYPE; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java index 72835b441..937cb0a27 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java @@ -49,10 +49,12 @@ import org.apache.fineract.infrastructure.core.exception.PlatformDataIntegrityEx import org.apache.fineract.infrastructure.dataqueries.data.EntityTables; import org.apache.fineract.infrastructure.dataqueries.data.StatusEnum; import org.apache.fineract.infrastructure.dataqueries.service.EntityDatatableChecksWritePlatformService; +import org.apache.fineract.infrastructure.event.business.domain.loan.LoanApplicationModifiedBusinessEvent; import org.apache.fineract.infrastructure.event.business.domain.loan.LoanApprovedBusinessEvent; import org.apache.fineract.infrastructure.event.business.domain.loan.LoanCreatedBusinessEvent; import org.apache.fineract.infrastructure.event.business.domain.loan.LoanRejectedBusinessEvent; import org.apache.fineract.infrastructure.event.business.domain.loan.LoanUndoApprovalBusinessEvent; +import org.apache.fineract.infrastructure.event.business.domain.loan.LoanWithdrawnByApplicantBusinessEvent; import org.apache.fineract.infrastructure.event.business.service.BusinessEventNotifierService; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.account.domain.AccountAssociationType; @@ -287,6 +289,8 @@ public class LoanApplicationWritePlatformServiceJpaRepositoryImpl implements Loa createAndPersistCalendarInstanceForInterestRecalculation(loan); } + businessEventNotifierService.notifyPostBusinessEvent(new LoanApplicationModifiedBusinessEvent(loan)); + return new CommandProcessingResultBuilder() // .withEntityId(loanId) // .withEntityExternalId(loan.getExternalId()) // @@ -740,6 +744,8 @@ public class LoanApplicationWritePlatformServiceJpaRepositoryImpl implements Loa createNote(noteText, loan); } + businessEventNotifierService.notifyPostBusinessEvent(new LoanWithdrawnByApplicantBusinessEvent(loan)); + return new CommandProcessingResultBuilder() // .withCommandId(command.commandId()) // .withEntityId(loan.getId()) // diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml b/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml index e05afb890..ac4f001cc 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml @@ -205,4 +205,5 @@ + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0187_add_Loan_modified_and_withdrawn_event_configuration.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0187_add_Loan_modified_and_withdrawn_event_configuration.xml new file mode 100644 index 000000000..386e4e5ff --- /dev/null +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0187_add_Loan_modified_and_withdrawn_event_configuration.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + diff --git a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationValidationServiceTest.java b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationValidationServiceTest.java index 4e3df0710..99f0284a6 100644 --- a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationValidationServiceTest.java +++ b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationValidationServiceTest.java @@ -69,10 +69,10 @@ public class ExternalEventConfigurationValidationServiceTest { List configurations = Arrays.asList("CentersCreateBusinessEvent", "ClientActivateBusinessEvent", "ClientCreateBusinessEvent", "ClientRejectBusinessEvent", "DocumentCreatedBusinessEvent", "DocumentDeletedBusinessEvent", "FixedDepositAccountCreateBusinessEvent", "GroupsCreateBusinessEvent", "LoanAcceptTransferBusinessEvent", - "LoanAddChargeBusinessEvent", "LoanAdjustTransactionBusinessEvent", "LoanApplyOverdueChargeBusinessEvent", - "LoanApprovedBusinessEvent", "LoanBalanceChangedBusinessEvent", "LoanChargebackTransactionBusinessEvent", - "LoanChargePaymentPostBusinessEvent", "LoanChargePaymentPreBusinessEvent", "LoanChargeRefundBusinessEvent", - "LoanCloseAsRescheduleBusinessEvent", "LoanCloseBusinessEvent", "LoanCreatedBusinessEvent", + "LoanAddChargeBusinessEvent", "LoanAdjustTransactionBusinessEvent", "LoanApplicationModifiedBusinessEvent", + "LoanApplyOverdueChargeBusinessEvent", "LoanApprovedBusinessEvent", "LoanBalanceChangedBusinessEvent", + "LoanChargebackTransactionBusinessEvent", "LoanChargePaymentPostBusinessEvent", "LoanChargePaymentPreBusinessEvent", + "LoanChargeRefundBusinessEvent", "LoanCloseAsRescheduleBusinessEvent", "LoanCloseBusinessEvent", "LoanCreatedBusinessEvent", "LoanCreditBalanceRefundPostBusinessEvent", "LoanCreditBalanceRefundPreBusinessEvent", "LoanDeleteChargeBusinessEvent", "LoanDisbursalBusinessEvent", "LoanDisbursalTransactionBusinessEvent", "LoanForeClosurePostBusinessEvent", "LoanForeClosurePreBusinessEvent", "LoanInitiateTransferBusinessEvent", "LoanInterestRecalculationBusinessEvent", @@ -89,9 +89,9 @@ public class ExternalEventConfigurationValidationServiceTest { "LoanUndoApprovalBusinessEvent", "LoanUndoDisbursalBusinessEvent", "LoanUndoLastDisbursalBusinessEvent", "LoanUndoWrittenOffBusinessEvent", "LoanUpdateChargeBusinessEvent", "LoanUpdateDisbursementDataBusinessEvent", "LoanWaiveChargeBusinessEvent", "LoanWaiveChargeUndoBusinessEvent", "LoanWaiveInterestBusinessEvent", - "LoanWithdrawTransferBusinessEvent", "LoanWrittenOffPostBusinessEvent", "LoanWrittenOffPreBusinessEvent", - "RecurringDepositAccountCreateBusinessEvent", "SavingsActivateBusinessEvent", "SavingsApproveBusinessEvent", - "SavingsCloseBusinessEvent", "SavingsCreateBusinessEvent", "SavingsDepositBusinessEvent", + "LoanWithdrawnByApplicantBusinessEvent", "LoanWithdrawTransferBusinessEvent", "LoanWrittenOffPostBusinessEvent", + "LoanWrittenOffPreBusinessEvent", "RecurringDepositAccountCreateBusinessEvent", "SavingsActivateBusinessEvent", + "SavingsApproveBusinessEvent", "SavingsCloseBusinessEvent", "SavingsCreateBusinessEvent", "SavingsDepositBusinessEvent", "SavingsPostInterestBusinessEvent", "SavingsRejectBusinessEvent", "SavingsWithdrawalBusinessEvent", "ShareAccountApproveBusinessEvent", "ShareAccountCreateBusinessEvent", "ShareProductDividentsCreateBusinessEvent", "LoanChargeAdjustmentPostBusinessEvent", "LoanChargeAdjustmentPreBusinessEvent", "LoanDelinquencyRangeChangeBusinessEvent", @@ -160,17 +160,18 @@ public class ExternalEventConfigurationValidationServiceTest { "ClientActivateBusinessEvent", "ClientCreateBusinessEvent", "ClientRejectBusinessEvent", "DocumentCreatedBusinessEvent", "DocumentDeletedBusinessEvent", "FixedDepositAccountCreateBusinessEvent", "GroupsCreateBusinessEvent", "LoanAcceptTransferBusinessEvent", "LoanAddChargeBusinessEvent", "LoanAdjustTransactionBusinessEvent", - "LoanApplyOverdueChargeBusinessEvent", "LoanApprovedBusinessEvent", "LoanBalanceChangedBusinessEvent", - "LoanChargebackTransactionBusinessEvent", "LoanChargePaymentPostBusinessEvent", "LoanChargePaymentPreBusinessEvent", - "LoanChargeRefundBusinessEvent", "LoanCloseAsRescheduleBusinessEvent", "LoanCloseBusinessEvent", "LoanCreatedBusinessEvent", - "LoanCreditBalanceRefundPostBusinessEvent", "LoanCreditBalanceRefundPreBusinessEvent", "LoanDeleteChargeBusinessEvent", - "LoanDisbursalBusinessEvent", "LoanDisbursalTransactionBusinessEvent", "LoanForeClosurePostBusinessEvent", - "LoanForeClosurePreBusinessEvent", "LoanInitiateTransferBusinessEvent", "LoanInterestRecalculationBusinessEvent", - "LoanProductCreateBusinessEvent", "LoanReassignOfficerBusinessEvent", "LoanRefundPostBusinessEvent", - "LoanRefundPreBusinessEvent", "LoanRejectedBusinessEvent", "LoanRejectTransferBusinessEvent", - "LoanRemoveOfficerBusinessEvent", "LoanRepaymentDueBusinessEvent", "LoanRepaymentOverdueBusinessEvent", - "LoanRescheduledDueCalendarChangeBusinessEvent", "LoanRescheduledDueHolidayBusinessEvent", - "LoanScheduleVariationsAddedBusinessEvent", "LoanScheduleVariationsDeletedBusinessEvent", "LoanStatusChangedBusinessEvent", + "LoanApplicationModifiedBusinessEvent", "LoanApplyOverdueChargeBusinessEvent", "LoanApprovedBusinessEvent", + "LoanBalanceChangedBusinessEvent", "LoanChargebackTransactionBusinessEvent", "LoanChargePaymentPostBusinessEvent", + "LoanChargePaymentPreBusinessEvent", "LoanChargeRefundBusinessEvent", "LoanCloseAsRescheduleBusinessEvent", + "LoanCloseBusinessEvent", "LoanCreatedBusinessEvent", "LoanCreditBalanceRefundPostBusinessEvent", + "LoanCreditBalanceRefundPreBusinessEvent", "LoanDeleteChargeBusinessEvent", "LoanDisbursalBusinessEvent", + "LoanDisbursalTransactionBusinessEvent", "LoanForeClosurePostBusinessEvent", "LoanForeClosurePreBusinessEvent", + "LoanInitiateTransferBusinessEvent", "LoanInterestRecalculationBusinessEvent", "LoanProductCreateBusinessEvent", + "LoanReassignOfficerBusinessEvent", "LoanRefundPostBusinessEvent", "LoanRefundPreBusinessEvent", + "LoanRejectedBusinessEvent", "LoanRejectTransferBusinessEvent", "LoanRemoveOfficerBusinessEvent", + "LoanRepaymentDueBusinessEvent", "LoanRepaymentOverdueBusinessEvent", "LoanRescheduledDueCalendarChangeBusinessEvent", + "LoanRescheduledDueHolidayBusinessEvent", "LoanScheduleVariationsAddedBusinessEvent", + "LoanScheduleVariationsDeletedBusinessEvent", "LoanStatusChangedBusinessEvent", "LoanTransactionGoodwillCreditPostBusinessEvent", "LoanTransactionGoodwillCreditPreBusinessEvent", "LoanTransactionMakeRepaymentPostBusinessEvent", "LoanTransactionMakeRepaymentPreBusinessEvent", "LoanTransactionMerchantIssuedRefundPostBusinessEvent", "LoanTransactionMerchantIssuedRefundPreBusinessEvent", @@ -179,9 +180,9 @@ public class ExternalEventConfigurationValidationServiceTest { "LoanUndoApprovalBusinessEvent", "LoanUndoDisbursalBusinessEvent", "LoanUndoLastDisbursalBusinessEvent", "LoanUndoWrittenOffBusinessEvent", "LoanUpdateChargeBusinessEvent", "LoanUpdateDisbursementDataBusinessEvent", "LoanWaiveChargeBusinessEvent", "LoanWaiveChargeUndoBusinessEvent", "LoanWaiveInterestBusinessEvent", - "LoanWithdrawTransferBusinessEvent", "LoanWrittenOffPostBusinessEvent", "LoanWrittenOffPreBusinessEvent", - "RecurringDepositAccountCreateBusinessEvent", "SavingsActivateBusinessEvent", "SavingsApproveBusinessEvent", - "SavingsCloseBusinessEvent", "SavingsCreateBusinessEvent", "SavingsDepositBusinessEvent", + "LoanWithdrawnByApplicantBusinessEvent", "LoanWithdrawTransferBusinessEvent", "LoanWrittenOffPostBusinessEvent", + "LoanWrittenOffPreBusinessEvent", "RecurringDepositAccountCreateBusinessEvent", "SavingsActivateBusinessEvent", + "SavingsApproveBusinessEvent", "SavingsCloseBusinessEvent", "SavingsCreateBusinessEvent", "SavingsDepositBusinessEvent", "SavingsPostInterestBusinessEvent", "SavingsRejectBusinessEvent", "SavingsWithdrawalBusinessEvent", "ShareAccountApproveBusinessEvent", "ShareAccountCreateBusinessEvent", "ShareProductDividentsCreateBusinessEvent", "LoanChargeAdjustmentPostBusinessEvent", "LoanChargeAdjustmentPreBusinessEvent", "LoanDelinquencyRangeChangeBusinessEvent", diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/ExternalBusinessEventTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/ExternalBusinessEventTest.java index 223b71e85..f1c556f84 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/ExternalBusinessEventTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/ExternalBusinessEventTest.java @@ -46,6 +46,7 @@ import org.apache.fineract.client.models.PostLoansLoanIdTransactionsResponse; import org.apache.fineract.client.models.PostLoansRequest; import org.apache.fineract.client.models.PostLoansResponse; import org.apache.fineract.client.models.PostUpdateRescheduleLoansRequest; +import org.apache.fineract.client.models.PutLoansLoanIdRequest; import org.apache.fineract.infrastructure.configuration.api.GlobalConfigurationConstants; import org.apache.fineract.infrastructure.event.external.data.ExternalEventResponse; import org.apache.fineract.integrationtests.common.BusinessStepHelper; @@ -900,6 +901,57 @@ public class ExternalBusinessEventTest extends BaseLoanIntegrationTest { }); } + @Test + public void verifyLoanApplicationModifiedBusinessEvent01() { + runAt("1 March 2024", () -> { + + externalEventHelper.enableBusinessEvent("LoanApplicationModifiedBusinessEvent"); + + PostLoansRequest loanRequest = applyForLoanApplication(client.getClientId(), loanProductId, BigDecimal.valueOf(4000), + "1 March 2023", "1 March 2024"); + PostLoansResponse applicationResponse = loanTransactionHelper.applyLoan(loanRequest); + Long loanId = applicationResponse.getResourceId(); + Assertions.assertNotNull(loanId); + + PutLoansLoanIdRequest modification = new PutLoansLoanIdRequest().clientId(client.getClientId()).productId(loanProductId) + .transactionProcessingStrategyCode(DEFAULT_STRATEGY).interestRatePerPeriod(BigDecimal.valueOf(2)).repaymentEvery(1) + .principal(550L).amortizationType(1).interestType(1).interestCalculationPeriodType(0) + .expectedDisbursementDate("1 March 2024").repaymentFrequencyType(2).numberOfRepayments(4).loanTermFrequency(4) + .loanTermFrequencyType(2).loanType("individual").dateFormat("dd MMMM yyyy").locale("en_GB"); + + loanTransactionHelper.modifyApplicationForLoan(loanId, "modify", modification); + + List modifiedEvents = ExternalEventHelper.getAllExternalEvents(requestSpec, responseSpec).stream() + .filter(e -> "LoanApplicationModifiedBusinessEvent".equals(e.getType())).toList(); + + Assertions.assertEquals(1, modifiedEvents.size()); + ExternalEventResponse event = modifiedEvents.get(0); + + Assertions.assertEquals(550.0D, event.getPayLoad().get("principal")); // the new principal + }); + } + + @Test + public void verifyLoanWithdrawnByApplicantBusinessEvent01() { + runAt("01 March 2024", () -> { + + externalEventHelper.enableBusinessEvent("LoanWithdrawnByApplicantBusinessEvent"); + + PostLoansRequest loanRequest = applyForLoanApplication(client.getClientId(), loanProductId, BigDecimal.valueOf(4000), + "1 March 2023", "01 March 2024"); + PostLoansResponse applicationResponse = loanTransactionHelper.applyLoan(loanRequest); + Long loanId = applicationResponse.getLoanId(); + Assertions.assertNotNull(loanId); + + loanTransactionHelper.withdrawLoanApplicationByClient("01 March 2024", loanId.intValue()); + + List events = ExternalEventHelper.getAllExternalEvents(requestSpec, responseSpec).stream() + .filter(e -> "LoanWithdrawnByApplicantBusinessEvent".equals(e.getType())).toList(); + + Assertions.assertEquals(1, events.size()); + }); + } + @Nested class ExternalIdGenerationTest { @@ -1054,6 +1106,17 @@ public class ExternalBusinessEventTest extends BaseLoanIntegrationTest { return loanId; } + private static PostLoansRequest applyForLoanApplication(final Long clientId, final Long loanProductId, BigDecimal principal, + String submittedOnDate, String expectedDisburmentDate) { + final PostLoansRequest loanRequest = new PostLoansRequest() // + .loanTermFrequency(4).locale("en_GB").loanTermFrequencyType(2).numberOfRepayments(4).repaymentFrequencyType(2) + .interestRatePerPeriod(BigDecimal.valueOf(2)).repaymentEvery(1).principal(principal).amortizationType(1).interestType(1) + .interestCalculationPeriodType(0).dateFormat("dd MMMM yyyy").transactionProcessingStrategyCode(DEFAULT_STRATEGY) + .loanType("individual").submittedOnDate(submittedOnDate).expectedDisbursementDate(expectedDisburmentDate).clientId(clientId) + .productId(loanProductId); + return loanRequest; + } + private void enableLoanInterestRefundPstBusinessEvent(boolean enabled) { externalEventHelper.configureBusinessEvent("LoanTransactionInterestRefundPostBusinessEvent", enabled); } diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ExternalEventConfigurationHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ExternalEventConfigurationHelper.java index 4015dfb59..4e3819e47 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ExternalEventConfigurationHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/ExternalEventConfigurationHelper.java @@ -108,6 +108,11 @@ public class ExternalEventConfigurationHelper { loanAdjustTransactionBusinessEvent.put("enabled", false); defaults.add(loanAdjustTransactionBusinessEvent); + Map LoanApplicationModifiedBusinessEvent = new HashMap<>(); + LoanApplicationModifiedBusinessEvent.put("type", "LoanApplicationModifiedBusinessEvent"); + LoanApplicationModifiedBusinessEvent.put("enabled", false); + defaults.add(LoanApplicationModifiedBusinessEvent); + Map loanApplyOverdueChargeBusinessEvent = new HashMap<>(); loanApplyOverdueChargeBusinessEvent.put("type", "LoanApplyOverdueChargeBusinessEvent"); loanApplyOverdueChargeBusinessEvent.put("enabled", false); @@ -368,6 +373,11 @@ public class ExternalEventConfigurationHelper { loanWaiveInterestBusinessEvent.put("enabled", false); defaults.add(loanWaiveInterestBusinessEvent); + Map LoanWithdrawnByApplicantBusinessEvent = new HashMap<>(); + LoanWithdrawnByApplicantBusinessEvent.put("type", "LoanWithdrawnByApplicantBusinessEvent"); + LoanWithdrawnByApplicantBusinessEvent.put("enabled", false); + defaults.add(LoanWithdrawnByApplicantBusinessEvent); + Map loanWithdrawTransferBusinessEvent = new HashMap<>(); loanWithdrawTransferBusinessEvent.put("type", "LoanWithdrawTransferBusinessEvent"); loanWithdrawTransferBusinessEvent.put("enabled", false);