diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/SearchParameters.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/SearchParameters.java index c0b6c80b6a5..879d0f4d7ec 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/SearchParameters.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/SearchParameters.java @@ -18,11 +18,14 @@ */ package org.apache.fineract.infrastructure.core.service; +import lombok.AllArgsConstructor; +import lombok.Builder; import org.apache.commons.lang3.StringUtils; +@Builder +@AllArgsConstructor public final class SearchParameters { - private final String sqlSearch; private final Long officeId; private final String externalId; private final String name; @@ -44,28 +47,26 @@ public final class SearchParameters { private final Long savingsId; private final Boolean orphansOnly; - // Provisning Entries Search Params + // Provisioning Entries Search Params private final Long provisioningEntryId; private final Long productId; private final Long categoryId; private final boolean isSelfUser; - public static SearchParameters from(final String sqlSearch, final Long officeId, final String externalId, final String name, - final String hierarchy) { + public static SearchParameters from(final Long officeId, final String externalId, final String name, final String hierarchy) { final Long staffId = null; final String accountNo = null; final Long loanId = null; final Long savingsId = null; final Boolean orphansOnly = false; final boolean isSelfUser = false; - return new SearchParameters(sqlSearch, officeId, externalId, name, hierarchy, null, null, null, null, null, null, staffId, - accountNo, loanId, savingsId, orphansOnly, isSelfUser); + return new SearchParameters(officeId, externalId, name, hierarchy, null, null, null, null, null, null, staffId, accountNo, loanId, + savingsId, orphansOnly, isSelfUser); } - public static SearchParameters forClients(final String sqlSearch, final Long officeId, final String externalId, - final String displayName, final String firstname, final String lastname, final String status, final String hierarchy, - final Integer offset, final Integer limit, final String orderBy, final String sortOrder, final Boolean orphansOnly, - final boolean isSelfUser) { + public static SearchParameters forClients(final Long officeId, final String externalId, final String displayName, + final String firstname, final String lastname, final String status, final String hierarchy, final Integer offset, + final Integer limit, final String orderBy, final String sortOrder, final Boolean orphansOnly, final boolean isSelfUser) { final Integer maxLimitAllowed = getCheckedLimit(limit); final Long staffId = null; @@ -73,8 +74,8 @@ public static SearchParameters forClients(final String sqlSearch, final Long off final Long loanId = null; final Long savingsId = null; - return new SearchParameters(sqlSearch, officeId, externalId, displayName, hierarchy, firstname, lastname, status, offset, - maxLimitAllowed, orderBy, sortOrder, staffId, accountNo, loanId, savingsId, orphansOnly, isSelfUser); + return new SearchParameters(officeId, externalId, displayName, hierarchy, firstname, lastname, status, offset, maxLimitAllowed, + orderBy, sortOrder, staffId, accountNo, loanId, savingsId, orphansOnly, isSelfUser); } public static SearchParameters forGroups(final Long officeId, final Long staffId, final String externalId, final String name, @@ -94,12 +95,12 @@ public static SearchParameters forGroups(final Long officeId, final Long staffId public static SearchParameters forOffices(final String orderBy, final String sortOrder) { final Boolean orphansOnly = false; final boolean isSelfUser = false; - return new SearchParameters(null, null, null, null, null, null, null, null, null, orderBy, sortOrder, null, null, null, null, - orphansOnly, isSelfUser); + return new SearchParameters(null, null, null, null, null, null, null, null, orderBy, sortOrder, null, null, null, null, orphansOnly, + isSelfUser); } - public static SearchParameters forLoans(final String sqlSearch, final String externalId, final Integer offset, final Integer limit, - final String orderBy, final String sortOrder, final String accountNo) { + public static SearchParameters forLoans(final String externalId, final Integer offset, final Integer limit, final String orderBy, + final String sortOrder, final String accountNo) { final Integer maxLimitAllowed = getCheckedLimit(limit); final Long staffId = null; @@ -108,8 +109,8 @@ public static SearchParameters forLoans(final String sqlSearch, final String ext final Boolean orphansOnly = false; final boolean isSelfUser = false; - return new SearchParameters(sqlSearch, null, externalId, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, - staffId, accountNo, loanId, savingsId, orphansOnly, isSelfUser); + return new SearchParameters(null, externalId, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, staffId, + accountNo, loanId, savingsId, orphansOnly, isSelfUser); } public static SearchParameters forJournalEntries(final Long officeId, final Integer offset, final Integer limit, final String orderBy, @@ -120,8 +121,8 @@ public static SearchParameters forJournalEntries(final Long officeId, final Inte final Boolean orphansOnly = false; final boolean isSelfUser = false; - return new SearchParameters(null, officeId, null, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, staffId, - null, loanId, savingsId, orphansOnly, isSelfUser); + return new SearchParameters(officeId, null, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, staffId, null, + loanId, savingsId, orphansOnly, isSelfUser); } public static SearchParameters forJournalEntries(final Long officeId, final Integer offset, final Integer limit, final String orderBy, @@ -130,8 +131,8 @@ public static SearchParameters forJournalEntries(final Long officeId, final Inte final Long staffId = null; final Boolean orphansOnly = false; - return new SearchParameters(null, officeId, null, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, staffId, - null, loanId, savingsId, orphansOnly, currencyCode); + return new SearchParameters(officeId, null, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, staffId, null, + loanId, savingsId, orphansOnly, currencyCode); } public static SearchParameters forPagination(final Integer offset, final Integer limit, final String orderBy, final String sortOrder) { @@ -143,8 +144,8 @@ public static SearchParameters forPagination(final Integer offset, final Integer final Boolean orphansOnly = false; final boolean isSelfUser = false; - return new SearchParameters(null, null, null, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, staffId, null, - loanId, savingsId, orphansOnly, isSelfUser); + return new SearchParameters(null, null, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, staffId, null, loanId, + savingsId, orphansOnly, isSelfUser); } public static SearchParameters forPaginationAndAccountNumberSearch(final Integer offset, final Integer limit, final String orderBy, @@ -157,8 +158,8 @@ public static SearchParameters forPaginationAndAccountNumberSearch(final Integer final Boolean orphansOnly = false; final boolean isSelfUser = false; - return new SearchParameters(null, null, null, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, staffId, - accountNumber, loanId, savingsId, orphansOnly, isSelfUser); + return new SearchParameters(null, null, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, staffId, accountNumber, + loanId, savingsId, orphansOnly, isSelfUser); } public static SearchParameters forPagination(final Integer offset, final Integer limit) { @@ -172,8 +173,8 @@ public static SearchParameters forPagination(final Integer offset, final Integer final String sortOrder = null; final boolean isSelfUser = false; - return new SearchParameters(null, null, null, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, staffId, null, - loanId, savingsId, orphansOnly, isSelfUser); + return new SearchParameters(null, null, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, staffId, null, loanId, + savingsId, orphansOnly, isSelfUser); } public static SearchParameters forProvisioningEntries(final Long provisioningEntryId, final Long officeId, final Long productId, @@ -181,8 +182,8 @@ public static SearchParameters forProvisioningEntries(final Long provisioningEnt return new SearchParameters(provisioningEntryId, officeId, productId, categoryId, offset, limit); } - public static SearchParameters forSavings(final String sqlSearch, final String externalId, final Integer offset, final Integer limit, - final String orderBy, final String sortOrder) { + public static SearchParameters forSavings(final String externalId, final Integer offset, final Integer limit, final String orderBy, + final String sortOrder) { final Integer maxLimitAllowed = getCheckedLimit(limit); final Long staffId = null; @@ -192,12 +193,12 @@ public static SearchParameters forSavings(final String sqlSearch, final String e final Boolean orphansOnly = false; final boolean isSelfUser = false; - return new SearchParameters(sqlSearch, null, externalId, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, - staffId, accountNo, loanId, savingsId, orphansOnly, isSelfUser); + return new SearchParameters(null, externalId, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, staffId, + accountNo, loanId, savingsId, orphansOnly, isSelfUser); } - public static SearchParameters forAccountTransfer(final String sqlSearch, final String externalId, final Integer offset, - final Integer limit, final String orderBy, final String sortOrder) { + public static SearchParameters forAccountTransfer(final String externalId, final Integer offset, final Integer limit, + final String orderBy, final String sortOrder) { final Integer maxLimitAllowed = getCheckedLimit(limit); final Long staffId = null; @@ -207,12 +208,11 @@ public static SearchParameters forAccountTransfer(final String sqlSearch, final final Boolean orphansOnly = false; final boolean isSelfUser = false; - return new SearchParameters(sqlSearch, null, externalId, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, - staffId, accountNo, loanId, savingsId, orphansOnly, isSelfUser); + return new SearchParameters(null, externalId, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, staffId, + accountNo, loanId, savingsId, orphansOnly, isSelfUser); } - public static SearchParameters forSMSCampaign(final String sqlSearch, final Integer offset, final Integer limit, final String orderBy, - final String sortOrder) { + public static SearchParameters forSMSCampaign(final Integer offset, final Integer limit, final String orderBy, final String sortOrder) { final String externalId = null; final Integer maxLimitAllowed = getCheckedLimit(limit); @@ -223,11 +223,11 @@ public static SearchParameters forSMSCampaign(final String sqlSearch, final Inte final Boolean orphansOnly = false; final boolean isSelfUser = false; - return new SearchParameters(sqlSearch, null, externalId, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, - staffId, accountNo, loanId, savingsId, orphansOnly, isSelfUser); + return new SearchParameters(null, externalId, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, staffId, + accountNo, loanId, savingsId, orphansOnly, isSelfUser); } - public static SearchParameters forEmailCampaign(final String sqlSearch, final Integer offset, final Integer limit, final String orderBy, + public static SearchParameters forEmailCampaign(final Integer offset, final Integer limit, final String orderBy, final String sortOrder) { final String externalId = null; @@ -239,44 +239,14 @@ public static SearchParameters forEmailCampaign(final String sqlSearch, final In final Boolean orphansOnly = false; final boolean isSelfUser = false; - return new SearchParameters(sqlSearch, null, externalId, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, - staffId, accountNo, loanId, savingsId, orphansOnly, isSelfUser); + return new SearchParameters(null, externalId, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, staffId, + accountNo, loanId, savingsId, orphansOnly, isSelfUser); } - private SearchParameters(final String sqlSearch, final Long officeId, final String externalId, final String name, - final String hierarchy, final String firstname, final String lastname, final Integer offset, final Integer limit, + private SearchParameters(final Long officeId, final String externalId, final String name, final String hierarchy, + final String firstname, final String lastname, final String status, final Integer offset, final Integer limit, final String orderBy, final String sortOrder, final Long staffId, final String accountNo, final Long loanId, final Long savingsId, final Boolean orphansOnly, boolean isSelfUser) { - this.sqlSearch = sqlSearch; - this.officeId = officeId; - this.externalId = externalId; - this.name = name; - this.hierarchy = hierarchy; - this.firstname = firstname; - this.lastname = lastname; - this.offset = offset; - this.limit = limit; - this.orderBy = orderBy; - this.sortOrder = sortOrder; - this.staffId = staffId; - this.accountNo = accountNo; - this.loanId = loanId; - this.savingsId = savingsId; - this.orphansOnly = orphansOnly; - this.currencyCode = null; - this.provisioningEntryId = null; - this.productId = null; - this.categoryId = null; - this.isSelfUser = isSelfUser; - this.status = null; - - } - - private SearchParameters(final String sqlSearch, final Long officeId, final String externalId, final String name, - final String hierarchy, final String firstname, final String lastname, final String status, final Integer offset, - final Integer limit, final String orderBy, final String sortOrder, final Long staffId, final String accountNo, - final Long loanId, final Long savingsId, final Boolean orphansOnly, boolean isSelfUser) { - this.sqlSearch = sqlSearch; this.officeId = officeId; this.externalId = externalId; this.name = name; @@ -305,7 +275,6 @@ private SearchParameters(final Long officeId, final String externalId, final Str final String firstname, final String lastname, final Integer offset, final Integer limit, final String orderBy, final String sortOrder, final Long staffId, final String accountNo, final Long loanId, final Long savingsId, final Boolean orphansOnly, boolean isSelfUser) { - this.sqlSearch = null; this.officeId = officeId; this.externalId = externalId; this.name = name; @@ -331,7 +300,6 @@ private SearchParameters(final Long officeId, final String externalId, final Str private SearchParameters(final Long provisioningEntryId, final Long officeId, final Long productId, final Long categoryId, final Integer offset, final Integer limit) { - this.sqlSearch = null; this.externalId = null; this.name = null; this.hierarchy = null; @@ -356,11 +324,10 @@ private SearchParameters(final Long provisioningEntryId, final Long officeId, fi } - public SearchParameters(final String sqlSearch, final Long officeId, final String externalId, final String name, final String hierarchy, - final String firstname, final String lastname, final Integer offset, final Integer limit, final String orderBy, - final String sortOrder, final Long staffId, final String accountNo, final Long loanId, final Long savingsId, - final Boolean orphansOnly, final String currencyCode) { - this.sqlSearch = sqlSearch; + public SearchParameters(final Long officeId, final String externalId, final String name, final String hierarchy, final String firstname, + final String lastname, final Integer offset, final Integer limit, final String orderBy, final String sortOrder, + final Long staffId, final String accountNo, final Long loanId, final Long savingsId, final Boolean orphansOnly, + final String currencyCode) { this.officeId = officeId; this.externalId = externalId; this.name = name; @@ -429,10 +396,6 @@ public boolean isScopedByOfficeHierarchy() { return StringUtils.isNotBlank(this.hierarchy); } - public String getSqlSearch() { - return this.sqlSearch; - } - public Long getOfficeId() { return this.officeId; } @@ -553,8 +516,8 @@ public static SearchParameters fromReportMailingJobRunHistory(final Integer offs final String sortOrder) { final Integer maxLimitAllowed = getCheckedLimit(limit); - return new SearchParameters(null, null, null, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, null, null, null, - null, null, false); + return new SearchParameters(null, null, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, null, null, null, null, + null, false); } /** @@ -566,7 +529,7 @@ public static SearchParameters fromReportMailingJob(final Integer offset, final final String sortOrder) { final Integer maxLimitAllowed = getCheckedLimit(limit); - return new SearchParameters(null, null, null, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, null, null, null, - null, null, false); + return new SearchParameters(null, null, null, null, null, null, offset, maxLimitAllowed, orderBy, sortOrder, null, null, null, null, + null, false); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookPopulatorServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookPopulatorServiceImpl.java index f6507a4bf39..f1f388bd9d1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookPopulatorServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookPopulatorServiceImpl.java @@ -271,8 +271,8 @@ private List fetchOffices(final Long officeId) { List offices = null; if (officeId == null) { Boolean includeAllOffices = Boolean.TRUE; - offices = (List) this.officeReadPlatformService.retrieveAllOffices(includeAllOffices, new SearchParameters(null, null, null, - null, null, null, null, null, null, "id", "asc", null, null, null, null, null, null)); + offices = (List) this.officeReadPlatformService.retrieveAllOffices(includeAllOffices, + new SearchParameters(null, null, null, null, null, null, null, null, "id", "asc", null, null, null, null, null, null)); } else { offices = new ArrayList<>(); offices.add(this.officeReadPlatformService.retrieveOffice(officeId)); @@ -341,7 +341,7 @@ private List fetchCenters(Long officeId) { if (officeId == null) { centers = (List) this.centerReadPlatformService.retrieveAll(null, null); } else { - SearchParameters searchParameters = SearchParameters.from(null, officeId, null, null, null); + SearchParameters searchParameters = SearchParameters.from(officeId, null, null, null); centers = (List) centerReadPlatformService.retrieveAll(searchParameters, null); } @@ -359,7 +359,7 @@ private List fetchClients(Long officeId) { } } } else { - SearchParameters searchParameters = SearchParameters.from(null, officeId, null, null, null); + SearchParameters searchParameters = SearchParameters.from(officeId, null, null, null); Page clientDataPage = this.clientReadPlatformService.retrieveAll(searchParameters); if (clientDataPage != null) { clients = new ArrayList<>(); @@ -420,7 +420,7 @@ private List fetchGroups(Long officeId) { if (officeId == null) { groups = (List) this.groupReadPlatformService.retrieveAll(null, null); } else { - SearchParameters searchParameters = SearchParameters.from(null, officeId, null, null, null); + SearchParameters searchParameters = SearchParameters.from(officeId, null, null, null); groups = (List) groupReadPlatformService.retrieveAll(searchParameters, null); } @@ -448,7 +448,7 @@ private List fetchLoanAccounts(final Long officeId) { if (officeId == null) { loanAccounts = loanReadPlatformService.retrieveAll(null).getPageItems(); } else { - SearchParameters searchParameters = SearchParameters.from(null, officeId, null, null, null); + SearchParameters searchParameters = SearchParameters.from(officeId, null, null, null); loanAccounts = loanReadPlatformService.retrieveAll(searchParameters).getPageItems(); } return loanAccounts; @@ -488,12 +488,11 @@ private WorkbookPopulator populateGuarantorWorkbook(Long officeId) { private List fetchSavingsAccounts(Long officeId) { List savingsAccounts = null; - String activeAccounts = "sa.status_enum = 300"; if (officeId != null) { - SearchParameters searchParameters = SearchParameters.from(activeAccounts, officeId, null, null, null); + SearchParameters searchParameters = SearchParameters.builder().officeId(officeId).status("300").build(); savingsAccounts = savingsAccountReadPlatformService.retrieveAll(searchParameters).getPageItems(); } else { - SearchParameters searchParameters = SearchParameters.from(activeAccounts, null, null, null, null); + SearchParameters searchParameters = SearchParameters.builder().status("300").build(); savingsAccounts = savingsAccountReadPlatformService.retrieveAll(searchParameters).getPageItems(); } return savingsAccounts; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailApiResource.java index 50e90b12d42..15ca3df83b7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailApiResource.java @@ -74,12 +74,11 @@ public String retrieveAllEmails(@Context final UriInfo uriInfo) { @GET @Path("pendingEmail") - public String retrievePendingEmail(@QueryParam("sqlSearch") final String sqlSearch, @QueryParam("offset") final Integer offset, - @QueryParam("limit") final Integer limit, @QueryParam("orderBy") final String orderBy, - @QueryParam("sortOrder") final String sortOrder, @Context final UriInfo uriInfo) { + public String retrievePendingEmail(@QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, + @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder, @Context final UriInfo uriInfo) { context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); - final SearchParameters searchParameters = SearchParameters.forEmailCampaign(sqlSearch, offset, limit, orderBy, sortOrder); + final SearchParameters searchParameters = SearchParameters.forEmailCampaign(offset, limit, orderBy, sortOrder); Collection emailMessages = readPlatformService.retrieveAllPending(searchParameters); final ApiRequestJsonSerializationSettings settings = apiRequestParameterHelper.process(uriInfo.getQueryParameters()); return toApiJsonSerializer.serialize(settings, emailMessages); @@ -87,13 +86,12 @@ public String retrievePendingEmail(@QueryParam("sqlSearch") final String sqlSear @GET @Path("sentEmail") - public String retrieveSentEmail(@QueryParam("sqlSearch") final String sqlSearch, @QueryParam("offset") final Integer offset, - @QueryParam("limit") final Integer limit, @QueryParam("orderBy") final String orderBy, - @QueryParam("sortOrder") final String sortOrder, @Context final UriInfo uriInfo) { + public String retrieveSentEmail(@QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, + @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder, @Context final UriInfo uriInfo) { context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); - final SearchParameters searchParameters = SearchParameters.forEmailCampaign(sqlSearch, offset, limit, orderBy, sortOrder); + final SearchParameters searchParameters = SearchParameters.forEmailCampaign(offset, limit, orderBy, sortOrder); Collection emailMessages = readPlatformService.retrieveAllSent(searchParameters); final ApiRequestJsonSerializationSettings settings = apiRequestParameterHelper.process(uriInfo.getQueryParameters()); @@ -133,7 +131,7 @@ public String retrieveFailedEmail(@QueryParam("sqlSearch") final String sqlSearc context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); - final SearchParameters searchParameters = SearchParameters.forEmailCampaign(sqlSearch, offset, limit, orderBy, sortOrder); + final SearchParameters searchParameters = SearchParameters.forEmailCampaign(offset, limit, orderBy, sortOrder); Collection emailMessages = readPlatformService.retrieveAllFailed(searchParameters); final ApiRequestJsonSerializationSettings settings = apiRequestParameterHelper.process(uriInfo.getQueryParameters()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/api/SmsCampaignApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/api/SmsCampaignApiResource.java index 6381366abf8..eac469e9195 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/api/SmsCampaignApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/api/SmsCampaignApiResource.java @@ -139,11 +139,10 @@ public String retrieveCampaign(@PathParam("resourceId") final Long resourceId, @ smscampaigns""") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SmsCampaignData.class))) - public String retrieveAllEmails(@QueryParam("sqlSearch") final String sqlSearch, @QueryParam("offset") final Integer offset, - @QueryParam("limit") final Integer limit, @QueryParam("orderBy") final String orderBy, - @QueryParam("sortOrder") final String sortOrder, @Context final UriInfo uriInfo) { + public String retrieveAllEmails(@QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, + @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder, @Context final UriInfo uriInfo) { platformSecurityContext.authenticatedUser().validateHasReadPermission(SmsCampaignConstants.RESOURCE_NAME); - final SearchParameters searchParameters = SearchParameters.forSMSCampaign(sqlSearch, offset, limit, orderBy, sortOrder); + final SearchParameters searchParameters = SearchParameters.forSMSCampaign(offset, limit, orderBy, sortOrder); Page smsCampaignDataCollection = smsCampaignReadPlatformService.retrieveAll(searchParameters); final ApiRequestJsonSerializationSettings settings = apiRequestParameterHelper.process(uriInfo.getQueryParameters()); return toApiJsonSerializer.serialize(settings, smsCampaignDataCollection); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/api/SmsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/api/SmsApiResource.java index e6a7bc45554..841a509ef01 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/api/SmsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/api/SmsApiResource.java @@ -95,11 +95,11 @@ public String retrieveOne(@PathParam("resourceId") final Long resourceId, @Conte public String retrieveAllSmsByStatus(@PathParam("campaignId") final Long campaignId, @Context final UriInfo uriInfo, @QueryParam("status") final Long status, @QueryParam("fromDate") final DateParam fromDateParam, @QueryParam("toDate") final DateParam toDateParam, @QueryParam("locale") final String locale, - @QueryParam("dateFormat") final String rawDateFormat, @QueryParam("sqlSearch") final String sqlSearch, - @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, - @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder) { + @QueryParam("dateFormat") final String rawDateFormat, @QueryParam("offset") final Integer offset, + @QueryParam("limit") final Integer limit, @QueryParam("orderBy") final String orderBy, + @QueryParam("sortOrder") final String sortOrder) { context.authenticatedUser().validateHasReadPermission(resourceNameForPermissions); - final SearchParameters searchParameters = SearchParameters.forSMSCampaign(sqlSearch, offset, limit, orderBy, sortOrder); + final SearchParameters searchParameters = SearchParameters.forSMSCampaign(offset, limit, orderBy, sortOrder); final DateFormat dateFormat = StringUtils.isBlank(rawDateFormat) ? null : new DateFormat(rawDateFormat); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResource.java index 29a0d4df10d..cc0baa4f6da 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResource.java @@ -116,7 +116,6 @@ public String create(@Parameter(hidden = true) final String apiRequestBodyAsJson @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountTransfersApiResourceSwagger.GetAccountTransfersResponse.class))) }) public String retrieveAll(@Context final UriInfo uriInfo, - @QueryParam("sqlSearch") @Parameter(description = "sqlSearch") final String sqlSearch, @QueryParam("externalId") @Parameter(description = "externalId") final String externalId, @QueryParam("offset") @Parameter(description = "offset") final Integer offset, @QueryParam("limit") @Parameter(example = "limit") final Integer limit, @@ -126,8 +125,7 @@ public String retrieveAll(@Context final UriInfo uriInfo, this.context.authenticatedUser().validateHasReadPermission(AccountTransfersApiConstants.ACCOUNT_TRANSFER_RESOURCE_NAME); - final SearchParameters searchParameters = SearchParameters.forAccountTransfer(sqlSearch, externalId, offset, limit, orderBy, - sortOrder); + final SearchParameters searchParameters = SearchParameters.forAccountTransfer(externalId, offset, limit, orderBy, sortOrder); final Page transfers = this.accountTransfersReadPlatformService.retrieveAll(searchParameters, accountDetailId); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResource.java index 166c14a66bf..a0a3faeb81e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResource.java @@ -169,7 +169,6 @@ private boolean is(final String commandParam, final String commandValue) { @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StandingInstructionApiResourceSwagger.GetStandingInstructionsResponse.class))) }) public String retrieveAll(@Context final UriInfo uriInfo, - @QueryParam("sqlSearch") @Parameter(description = "sqlSearch") final String sqlSearch, @QueryParam("externalId") @Parameter(description = "externalId") final String externalId, @QueryParam("offset") @Parameter(description = "offset") final Integer offset, @QueryParam("limit") @Parameter(description = "limit") final Integer limit, @@ -183,8 +182,7 @@ public String retrieveAll(@Context final UriInfo uriInfo, this.context.authenticatedUser().validateHasReadPermission(StandingInstructionApiConstants.STANDING_INSTRUCTION_RESOURCE_NAME); - final SearchParameters searchParameters = SearchParameters.forAccountTransfer(sqlSearch, externalId, offset, limit, orderBy, - sortOrder); + final SearchParameters searchParameters = SearchParameters.forAccountTransfer(externalId, offset, limit, orderBy, sortOrder); final LocalDate startDateRange = null; final LocalDate endDateRange = null; @@ -206,8 +204,7 @@ public String retrieveAll(@Context final UriInfo uriInfo, @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StandingInstructionApiResourceSwagger.GetStandingInstructionsStandingInstructionIdResponse.class))) }) public String retrieveOne( @PathParam("standingInstructionId") @Parameter(description = "standingInstructionId") final Long standingInstructionId, - @Context final UriInfo uriInfo, @QueryParam("sqlSearch") @Parameter(description = "sqlSearch") final String sqlSearch, - @QueryParam("externalId") @Parameter(description = "externalId") final String externalId, + @Context final UriInfo uriInfo, @QueryParam("externalId") @Parameter(description = "externalId") final String externalId, @QueryParam("offset") @Parameter(description = "offset") final Integer offset, @QueryParam("limit") @Parameter(description = "limit") final Integer limit, @QueryParam("orderBy") @Parameter(description = "orderBy") final String orderBy, @@ -216,8 +213,7 @@ public String retrieveOne( this.context.authenticatedUser().validateHasReadPermission(StandingInstructionApiConstants.STANDING_INSTRUCTION_RESOURCE_NAME); StandingInstructionData standingInstructionData = this.standingInstructionReadPlatformService.retrieveOne(standingInstructionId); - final SearchParameters searchParameters = SearchParameters.forAccountTransfer(sqlSearch, externalId, offset, limit, orderBy, - sortOrder); + final SearchParameters searchParameters = SearchParameters.forAccountTransfer(externalId, offset, limit, orderBy, sortOrder); final Set associationParameters = ApiParameterHelper.extractAssociationsForResponseIfProvided(uriInfo.getQueryParameters()); Page transfers = null; if (!associationParameters.isEmpty()) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResource.java index ced9d6390b6..c144ec0eabc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResource.java @@ -69,7 +69,6 @@ public class StandingInstructionHistoryApiResource { @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StandingInstructionHistoryApiResourceSwagger.GetStandingInstructionRunHistoryResponse.class))) }) public String retrieveAll(@Context final UriInfo uriInfo, - @QueryParam("sqlSearch") @Parameter(description = "sqlSearch") final String sqlSearch, @QueryParam("externalId") @Parameter(description = "externalId") final String externalId, @QueryParam("offset") @Parameter(description = "offset") final Integer offset, @QueryParam("limit") @Parameter(description = "limit") final Integer limit, @@ -89,8 +88,7 @@ public String retrieveAll(@Context final UriInfo uriInfo, final DateFormat dateFormat = StringUtils.isBlank(rawDateFormat) ? null : new DateFormat(rawDateFormat); - final SearchParameters searchParameters = SearchParameters.forAccountTransfer(sqlSearch, externalId, offset, limit, orderBy, - sortOrder); + final SearchParameters searchParameters = SearchParameters.forAccountTransfer(externalId, offset, limit, orderBy, sortOrder); LocalDate startDateRange = null; LocalDate endDateRange = null; if (fromDateParam != null) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java index 53d62bea0f2..427ef7e86b3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java @@ -136,7 +136,6 @@ public String retrieveTemplate(@Context final UriInfo uriInfo, @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientsResponse.class))) }) public String retrieveAll(@Context final UriInfo uriInfo, - @QueryParam("sqlSearch") @Parameter(description = "sqlSearch") final String sqlSearch, @QueryParam("officeId") @Parameter(description = "officeId") final Long officeId, @QueryParam("externalId") @Parameter(description = "externalId") final String externalId, @QueryParam("displayName") @Parameter(description = "displayName") final String displayName, @@ -150,8 +149,8 @@ public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("sortOrder") @Parameter(description = "sortOrder") final String sortOrder, @QueryParam("orphansOnly") @Parameter(description = "orphansOnly") final Boolean orphansOnly) { - return retrieveAll(uriInfo, sqlSearch, officeId, externalId, displayName, firstname, lastname, status, hierarchy, offset, limit, - orderBy, sortOrder, orphansOnly, false); + return retrieveAll(uriInfo, officeId, externalId, displayName, firstname, lastname, status, hierarchy, offset, limit, orderBy, + sortOrder, orphansOnly, false); } @GET @@ -440,13 +439,12 @@ public String retrieveTransferTemplate(@PathParam("externalId") final String ext return retrieveClientTransferTemplate(null, externalId); } - public String retrieveAll(final UriInfo uriInfo, final String sqlSearch, final Long officeId, final String externalId, - final String displayName, final String firstname, final String lastname, final String status, final String hierarchy, - final Integer offset, final Integer limit, final String orderBy, final String sortOrder, final Boolean orphansOnly, - final boolean isSelfUser) { + public String retrieveAll(final UriInfo uriInfo, final Long officeId, final String externalId, final String displayName, + final String firstname, final String lastname, final String status, final String hierarchy, final Integer offset, + final Integer limit, final String orderBy, final String sortOrder, final Boolean orphansOnly, final boolean isSelfUser) { context.authenticatedUser().validateHasReadPermission(ClientApiConstants.CLIENT_RESOURCE_NAME); - final SearchParameters searchParameters = SearchParameters.forClients(sqlSearch, officeId, externalId, displayName, firstname, - lastname, status, hierarchy, offset, limit, orderBy, sortOrder, orphansOnly, isSelfUser); + final SearchParameters searchParameters = SearchParameters.forClients(officeId, externalId, displayName, firstname, lastname, + status, hierarchy, offset, limit, orderBy, sortOrder, orphansOnly, isSelfUser); final Page clientData = clientReadPlatformService.retrieveAll(searchParameters); final ApiRequestJsonSerializationSettings settings = apiRequestParameterHelper.process(uriInfo.getQueryParameters()); return toApiJsonSerializer.serialize(settings, clientData, ClientApiConstants.CLIENT_RESPONSE_DATA_PARAMETERS); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java index 62ba40f5e3e..292a21abe31 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java @@ -227,7 +227,6 @@ public Page retrieveAll(final SearchParameters searchParameters) { private String buildSqlStringFromClientCriteria(String schemaSql, final SearchParameters searchParameters, List paramList) { - String sqlSearch = searchParameters.getSqlSearch(); final Long officeId = searchParameters.getOfficeId(); final String externalId = searchParameters.getExternalId(); final String displayName = searchParameters.getName(); @@ -236,13 +235,6 @@ private String buildSqlStringFromClientCriteria(String schemaSql, final SearchPa final String status = searchParameters.getStatus(); String extraCriteria = ""; - if (sqlSearch != null) { - sqlSearch = sqlSearch.replaceAll(" display_name ", " c.display_name "); - sqlSearch = sqlSearch.replaceAll("display_name ", "c.display_name "); - extraCriteria = " and (" + sqlSearch + ")"; - this.columnValidator.validateSqlInjection(schemaSql, sqlSearch); - } - if (officeId != null) { extraCriteria += " and c.office_id = ? "; paramList.add(officeId); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java index 530e8f10538..53d094e9aac 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java @@ -465,19 +465,19 @@ public String retrieveLoan(@PathParam("loanId") @Parameter(description = "loanId @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoansApiResourceSwagger.GetLoansResponse.class))) }) public String retrieveAll(@Context final UriInfo uriInfo, - @QueryParam("sqlSearch") @Parameter(description = "sqlSearch") final String sqlSearch, @QueryParam("externalId") @Parameter(description = "externalId") final String externalId, // @QueryParam("underHierarchy") final String hierarchy, @QueryParam("offset") @Parameter(description = "offset") final Integer offset, @QueryParam("limit") @Parameter(description = "limit") final Integer limit, @QueryParam("orderBy") @Parameter(description = "orderBy") final String orderBy, @QueryParam("sortOrder") @Parameter(description = "sortOrder") final String sortOrder, - @QueryParam("accountNo") @Parameter(description = "accountNo") final String accountNo) { + @QueryParam("accountNo") @Parameter(description = "accountNo") final String accountNo, + @QueryParam("status") @Parameter(description = "status") final String status) { this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); - final SearchParameters searchParameters = SearchParameters.forLoans(sqlSearch, externalId, offset, limit, orderBy, sortOrder, - accountNo); + final SearchParameters searchParameters = SearchParameters.builder().accountNo(accountNo).sortOrder(sortOrder) + .externalId(externalId).offset(offset).limit(limit).orderBy(orderBy).status(status).build(); final Page loanBasicDetails = this.loanReadPlatformService.retrieveAll(searchParameters); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java index 6adaa99757f..ac88157cb72 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java @@ -55,7 +55,6 @@ import org.apache.fineract.infrastructure.core.service.database.DatabaseSpecificSQLGenerator; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.infrastructure.security.utils.ColumnValidator; -import org.apache.fineract.infrastructure.security.utils.SQLInjectionValidator; import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.organisation.monetary.domain.ApplicationCurrency; import org.apache.fineract.organisation.monetary.domain.ApplicationCurrencyRepositoryWrapper; @@ -313,7 +312,7 @@ public Page retrieveAll(final SearchParameters searchParameters // TODO - for time being this will data scope list of loans returned to // only loans that have a client associated. - // to support senario where loan has group_id only OR client_id will + // to support scenario where loan has group_id only OR client_id will // probably require a UNION query // but that at present is an edge case sqlBuilder.append(" join m_office o on (o.id = c.office_id or o.id = g.office_id) "); @@ -327,12 +326,10 @@ public Page retrieveAll(final SearchParameters searchParameters if (searchParameters != null) { - String sqlQueryCriteria = searchParameters.getSqlSearch(); - if (StringUtils.isNotBlank(sqlQueryCriteria)) { - SQLInjectionValidator.validateSQLInput(sqlQueryCriteria); - sqlQueryCriteria = sqlQueryCriteria.replace("accountNo", "l.account_no"); - this.columnValidator.validateSqlInjection(sqlBuilder.toString(), sqlQueryCriteria); - sqlBuilder.append(" and (").append(sqlQueryCriteria).append(")"); + if (StringUtils.isNotBlank(searchParameters.getStatus())) { + sqlBuilder.append(" and l.loan_status_id = ?"); + extraCriterias.add(Integer.parseInt(searchParameters.getStatus())); + arrayPos = arrayPos + 1; } if (StringUtils.isNotBlank(searchParameters.getExternalId())) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResource.java index 2bb682a5dbe..8448fde62f6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResource.java @@ -125,7 +125,6 @@ public String template(@QueryParam("clientId") @Parameter(description = "clientI @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SavingsAccountsApiResourceSwagger.GetSavingsAccountsResponse.class))) }) public String retrieveAll(@Context final UriInfo uriInfo, - @QueryParam("sqlSearch") @Parameter(description = "sqlSearch") final String sqlSearch, @QueryParam("externalId") @Parameter(description = "externalId") final String externalId, // @QueryParam("underHierarchy") final String hierarchy, @QueryParam("offset") @Parameter(description = "offset") final Integer offset, @@ -135,7 +134,7 @@ public String retrieveAll(@Context final UriInfo uriInfo, context.authenticatedUser().validateHasReadPermission(SavingsApiConstants.SAVINGS_ACCOUNT_RESOURCE_NAME); - final SearchParameters searchParameters = SearchParameters.forSavings(sqlSearch, externalId, offset, limit, orderBy, sortOrder); + final SearchParameters searchParameters = SearchParameters.forSavings(externalId, offset, limit, orderBy, sortOrder); final Page products = savingsAccountReadPlatformService.retrieveAll(searchParameters); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java index e9c270b4624..d094213c595 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java @@ -200,11 +200,11 @@ public Page retrieveAll(final SearchParameters searchParamet objectArray[0] = hierarchySearchString; int arrayPos = 1; if (searchParameters != null) { - String sqlQueryCriteria = searchParameters.getSqlSearch(); - if (StringUtils.isNotBlank(sqlQueryCriteria)) { - sqlQueryCriteria = sqlQueryCriteria.replaceAll("accountNo", "sa.account_no"); - this.columnValidator.validateSqlInjection(sqlBuilder.toString(), sqlQueryCriteria); - sqlBuilder.append(" and (").append(sqlQueryCriteria).append(")"); + + if (StringUtils.isNotBlank(searchParameters.getStatus())) { + sqlBuilder.append(" and sa.status_enum = ?"); + objectArray[arrayPos] = Integer.parseInt(searchParameters.getStatus()); + arrayPos = arrayPos + 1; } if (StringUtils.isNotBlank(searchParameters.getExternalId())) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/client/api/SelfClientsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/client/api/SelfClientsApiResource.java index 82bece4ce3f..fcd7084c727 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/client/api/SelfClientsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/client/api/SelfClientsApiResource.java @@ -90,13 +90,12 @@ public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("orderBy") @Parameter(description = "orderBy") final String orderBy, @QueryParam("sortOrder") @Parameter(description = "sortOrder") final String sortOrder) { - final String sqlSearch = null; final Long officeId = null; final String externalId = null; final String hierarchy = null; final Boolean orphansOnly = null; - return this.clientApiResource.retrieveAll(uriInfo, sqlSearch, officeId, externalId, displayName, firstname, lastname, status, - hierarchy, offset, limit, orderBy, sortOrder, orphansOnly, true); + return this.clientApiResource.retrieveAll(uriInfo, officeId, externalId, displayName, firstname, lastname, status, hierarchy, + offset, limit, orderBy, sortOrder, orphansOnly, true); } @GET diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/ClientTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/ClientTest.java index 867f218ce07..cc35cfa801e 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/ClientTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/ClientTest.java @@ -62,7 +62,7 @@ Long create() { Optional retrieveFirst() { GetClientsResponse clients = ok( - fineract().clients.retrieveAll21(null, null, null, null, null, null, null, null, 0, 1, null, null, false)); + fineract().clients.retrieveAll21(null, null, null, null, null, null, null, 0, 1, null, null, false)); if (clients.getTotalFilteredRecords() != null && clients.getTotalFilteredRecords() > 0) { return clients.getPageItems().stream().findFirst().map(item -> item.getId()); }