Done ticket GEPFINBE-94

This commit is contained in:
rajesh
2024-11-18 18:55:05 +05:30
parent 8a6cd213b1
commit b591fb1b79
8 changed files with 107 additions and 62 deletions

View File

@@ -74,7 +74,7 @@ public interface CallApi {
public ResponseEntity<Response<CallResponse>> updateCallStep1(HttpServletRequest request,
@Parameter(description = "The call id", required = true) @PathVariable("callId") Long callId,
@Parameter(description = "Call request object", required = true) @Valid @RequestBody UpdateCallRequestStep1 updateCallRequest);
@Operation(summary = "Api to get call by id updated today to check the bug",
@Operation(summary = "Api to get call by id",
responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Not Found", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
@@ -86,7 +86,7 @@ public interface CallApi {
@GetMapping(value = "/{callId}",
produces = { "application/json" })
ResponseEntity<Response<CallResponse>> getCallById(HttpServletRequest request,
@Parameter(description = "The call ID", required = true) @PathVariable("callId") Long callId);
@Parameter(description = "The call ID", required = true) @PathVariable("callId") Long callId,@RequestParam(value = "companyId", required = false) Long companyId);
@Operation(summary = "Api to get all calls",
@@ -100,7 +100,7 @@ public interface CallApi {
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
@GetMapping(value = "",
produces = { "application/json" })
ResponseEntity<Response<List<CallDetailsResponseBean>>> getAllCalls(HttpServletRequest request);
ResponseEntity<Response<List<CallDetailsResponseBean>>> getAllCalls(HttpServletRequest request,@RequestParam(value = "companyId", required = false) Long companyId);
@Operation(summary = "Api to validate call",

View File

@@ -59,16 +59,16 @@ public class CallApiController implements CallApi {
}
@Override
@Transactional(readOnly = true)
public ResponseEntity<Response<CallResponse>> getCallById(HttpServletRequest request, Long callId) {
CallResponse createCallResponseBean = callService.getCallById(request, callId);
public ResponseEntity<Response<CallResponse>> getCallById(HttpServletRequest request, Long callId,Long companyId) {
CallResponse createCallResponseBean = callService.getCallById(request, callId,companyId);
return ResponseEntity.status(HttpStatus.OK)
.body(new Response<>(createCallResponseBean, Status.SUCCESS, Translator.toLocale(GepafinConstant.CALL_FETCH_SUCCESS_MSG)));
}
@Override
@Transactional(readOnly = true)
public ResponseEntity<Response<List<CallDetailsResponseBean>>> getAllCalls(HttpServletRequest request) {
List<CallDetailsResponseBean> calls = callService.getAllCalls(request);
public ResponseEntity<Response<List<CallDetailsResponseBean>>> getAllCalls(HttpServletRequest request,Long companyId) {
List<CallDetailsResponseBean> calls = callService.getAllCalls(request,companyId);
return ResponseEntity.status(HttpStatus.OK)
.body(new Response<>(calls, Status.SUCCESS, Translator.toLocale(GepafinConstant.CALL_FETCH_SUCCESS_MSG)));