Updated code

This commit is contained in:
nisha
2024-11-07 17:15:05 +05:30
parent 647b41b231
commit 9f5ac3839b
6 changed files with 25 additions and 19 deletions

View File

@@ -145,7 +145,7 @@ public interface ApplicationAmendmentRequestApi {
ResponseEntity<Response<ApplicationAmendmentRequestResponse>> closeApplicationAmendmentRequest(HttpServletRequest request,
@Parameter(description = "The Application Amendment id", required = true) @RequestParam("id") Long id,
@Valid @RequestBody CloseAmendmentRequest closeAmendmentRequest);
@Operation(summary = "Api to get amendment process by application id",
@Operation(summary = "Api to get amendment process list by application id",
responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
@@ -155,7 +155,9 @@ public interface ApplicationAmendmentRequestApi {
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
@GetMapping(value = "application/{id}", produces = "application/json")
ResponseEntity<Response<List<ApplicationAmendmentRequestResponse>>> getAmendmentByApplicationId(HttpServletRequest request, @Parameter(description = "The Application id", required = true) @PathVariable(value = "id", required = true) Long applicationId);
ResponseEntity<Response<List<ApplicationAmendmentRequestResponse>>> getAmendmentByApplicationId(HttpServletRequest request, @Parameter(description = "The Application id", required = true) @PathVariable(value = "id", required = true) Long applicationId,
@Parameter(description = "List of amendment statuses") @RequestParam(value = "statuses", required = false) List<ApplicationAmendmentRequestEnum> statuses
);
@Operation(summary = "Api to update application amendment status",
responses = {

View File

@@ -105,8 +105,8 @@ public class ApplicationAmendmentRequestController implements ApplicationAmendme
.body(new Response<>(response, Status.SUCCESS, Translator.toLocale(GepafinConstant.RESPONSE_DAYS_EXTENDED_SUCCESS_MSG)));
}
@Override
public ResponseEntity<Response<List<ApplicationAmendmentRequestResponse>>> getAmendmentByApplicationId(HttpServletRequest request, Long applicationId) {
List<ApplicationAmendmentRequestResponse> applicationAmendmentBean = applicationAmendmentRequestService.getAmendmentByApplicationId(request,applicationId);
public ResponseEntity<Response<List<ApplicationAmendmentRequestResponse>>> getAmendmentByApplicationId(HttpServletRequest request, Long applicationId,List<ApplicationAmendmentRequestEnum> statuses) {
List<ApplicationAmendmentRequestResponse> applicationAmendmentBean = applicationAmendmentRequestService.getAmendmentByApplicationId(request,applicationId,statuses);
return ResponseEntity.status(HttpStatus.OK)
.body(new Response<>(applicationAmendmentBean, Status.SUCCESS, Translator.toLocale(GepafinConstant.APPLICATION_DATA_FOR_AMENDMENT_SUCCESS_MSG)));
}