FINERACT-1971: Added default values for LoanAccountLockApi for paging parameters
This commit is contained in:
committed by
Arnold Gálovics
parent
8f3b114028
commit
9efe4f7ed5
+5
-2
@@ -35,6 +35,7 @@ import jakarta.ws.rs.core.UriInfo;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.fineract.cob.data.LoanAccountLockResponseDTO;
|
||||
@@ -64,8 +65,10 @@ public class LoanAccountLockApiResource {
|
||||
@Operation(summary = "List locked loan accounts", description = "Returns the locked loan IDs")
|
||||
@ApiResponses({
|
||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanAccountLockApiResourceSwagger.GetLoanAccountLockResponse.class))) })
|
||||
public String retrieveLockedAccounts(@Context final UriInfo uriInfo, @QueryParam("page") Integer page,
|
||||
@QueryParam("limit") Integer limit) {
|
||||
public String retrieveLockedAccounts(@Context final UriInfo uriInfo, @QueryParam("page") Integer pageParam,
|
||||
@QueryParam("limit") Integer limitParam) {
|
||||
int page = Objects.requireNonNullElse(pageParam, 0);
|
||||
int limit = Objects.requireNonNullElse(limitParam, 50);
|
||||
|
||||
List<LoanAccountLock> lockedLoanAccounts = loanAccountLockService.getLockedLoanAccountByPage(page, limit);
|
||||
LoanAccountLockResponseDTO response = new LoanAccountLockResponseDTO();
|
||||
|
||||
Reference in New Issue
Block a user