Implemented company in application

This commit is contained in:
rajesh
2024-09-29 19:59:10 +05:30
parent e4870b2c99
commit 9b3fd43bf9
28 changed files with 269 additions and 118 deletions

View File

@@ -67,7 +67,8 @@ public interface ApplicationApi {
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
@GetMapping(value = "", produces = "application/json")
ResponseEntity<Response<List<ApplicationResponse>>> getAllApplications(HttpServletRequest request,
@Parameter(description = "The call id", required = false) @RequestParam(value = "callId", required = false) Long callId);
@Parameter(description = "The call id", required = false) @RequestParam(value = "callId", required = false) Long callId,
@Parameter(description = "The company id", required = false) @RequestParam(value = "companyId", required = false) Long companyId);
@Operation(summary = "Api to delete application",
responses = {
@@ -93,9 +94,10 @@ public interface ApplicationApi {
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
@PostMapping(value = "/call/{callId}",
produces = { "application/json" })
ResponseEntity<Response<ApplicationResponse>> createApplicationByCallId(HttpServletRequest request,
@Parameter(description = " Flow request object", required = true) @Valid @RequestBody ApplicationRequest applicationRequest,
@Parameter(description = "The call ID", required = true) @PathVariable("callId") Long callId);
ResponseEntity<Response<ApplicationResponse>> createApplicationByCallId(HttpServletRequest request,
@Parameter(description = "The company ID", required = true) @RequestParam(value = "companyId", required = true) Long companyId,
@Parameter(description = " Flow request object", required = true) @Valid @RequestBody ApplicationRequest applicationRequest,
@Parameter(description = "The call ID", required = true) @PathVariable("callId") Long callId);

View File

@@ -31,9 +31,13 @@ public interface DocumentApi {
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = {
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) }))})
@PostMapping(value = "/uploadFile/source/{sourceId}", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
default ResponseEntity<Response<List<DocumentResponseBean>>> uploadFile(HttpServletRequest httpServletRequest, @Parameter(description = "Source Id", required = true) @PathVariable("sourceId") Long sourceId, @RequestParam DocumentSourceTypeEnum sourceType, @RequestParam("file") List<MultipartFile> files, @RequestParam("documentType") DocumentTypeEnum documentTypeEnum) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
default ResponseEntity<Response<List<DocumentResponseBean>>> uploadFile(HttpServletRequest httpServletRequest,
@Parameter(description = "Source Id", required = true) @PathVariable("sourceId") Long sourceId,
@RequestParam("sourceType") DocumentSourceTypeEnum sourceType,
@RequestParam("file") List<MultipartFile> files,
@RequestParam("documentType") DocumentTypeEnum documentTypeEnum) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
@Operation(summary = "API to delete a file by document id",
responses = {

View File

@@ -24,7 +24,7 @@ public interface FaqApi {
})
@PostMapping(value = "/call/{callId}", consumes = "application/json", produces = "application/json")
ResponseEntity<Response<FaqResponseBean>> createFaq(HttpServletRequest request, @Parameter(description = "call id", required = true)
@PathVariable("callId") Long callId, @Valid @RequestBody FaqReq faqRequest);
@PathVariable("callId") Long callId, @RequestParam(value = "companyId", required = false) Long companyId, @Valid @RequestBody FaqReq faqRequest);
@Operation(summary = "API to get FAQ by id",
responses = {

View File

@@ -60,14 +60,14 @@ public class ApplicationApiController implements ApplicationApi {
}
@Override
public ResponseEntity<Response<ApplicationResponse>> createApplicationByCallId(HttpServletRequest request, ApplicationRequest applicationRequest, Long callId) {
ApplicationResponse applicationResponseBean=applicationService.createApplication(request,applicationRequest,callId);
public ResponseEntity<Response<ApplicationResponse>> createApplicationByCallId(HttpServletRequest request, Long companyId, ApplicationRequest applicationRequest, Long callId) {
ApplicationResponse applicationResponseBean=applicationService.createApplication(request, companyId, applicationRequest, callId);
return ResponseEntity.status(HttpStatus.CREATED)
.body(new Response<>(applicationResponseBean, Status.SUCCESS, Translator.toLocale(GepafinConstant.APPLICATION_CREATED_SUCCESS_MSG)));
}
@Override
public ResponseEntity<Response<List<ApplicationResponse>>> getAllApplications(HttpServletRequest request,Long callId) {
List<ApplicationResponse> applications = applicationService.getAllApplications(request,callId);
public ResponseEntity<Response<List<ApplicationResponse>>> getAllApplications(HttpServletRequest request,Long callId,Long companyId) {
List<ApplicationResponse> applications = applicationService.getAllApplications(request,callId,companyId);
log.info("Get All Applications");
return ResponseEntity.status(HttpStatus.OK)
.body(new Response<>(applications, Status.SUCCESS, Translator.toLocale(GepafinConstant.GET_APPLICATION_SUCCESS_MSG)));

View File

@@ -22,8 +22,8 @@ public class FaqApiController implements FaqApi {
private FaqService faqService;
@Override
public ResponseEntity<Response<FaqResponseBean>> createFaq(HttpServletRequest request, Long callId,FaqReq faqRequest) {
FaqResponseBean response = faqService.createFaq(request,callId, faqRequest);
public ResponseEntity<Response<FaqResponseBean>> createFaq(HttpServletRequest request, Long callId, Long companyId, FaqReq faqRequest) {
FaqResponseBean response = faqService.createFaq(request,callId, companyId, faqRequest);
return ResponseEntity.status(HttpStatus.CREATED)
.body(new Response<>(response, Status.SUCCESS, Translator.toLocale(GepafinConstant.FAQ_CREATED_SUCCESSFULLY)));
}