Done ticket GEPAFINBE-6141

This commit is contained in:
rajesh
2025-11-11 15:23:40 +05:30
parent 98cdda457d
commit 05c3c95b65
19 changed files with 291 additions and 187 deletions

View File

@@ -35,7 +35,7 @@ public interface DashboardApi {
@ExampleObject(value = ErrorConstants.BADREQUEST_ERROR_EXAMPLE) })) })
@GetMapping(value = "",
produces = { "application/json" })
@PreAuthorize("hasRole('ROLE_SUPER_ADMIN') || hasRole('ROLE_INSTRUCTOR_MANAGER')")
@PreAuthorize("hasRole('ROLE_SUPER_ADMIN') || hasRole('ROLE_INSTRUCTOR_MANAGER') || hasRole('ROLE_DIRECTOR')")
ResponseEntity<Response<SuperAdminWidgetResponseBean>> getDashboardWidgetForSuperAdmin(HttpServletRequest request);
@Operation(summary = "Api to get dashboard widget for beneficiary",

View File

@@ -28,7 +28,7 @@ public interface PecMailApi {
@ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, examples = @ExampleObject(value =
ErrorConstants.BADREQUEST_ERROR_EXAMPLE))) })
@PostMapping(value = "/userAction", produces = "application/json")
ResponseEntity<Response<PecMailResponse>> sendPecMail(HttpServletRequest request,
ResponseEntity<Response< List<PecMailResponse>>> sendPecMail(HttpServletRequest request,
@Parameter(description = "The user action id", required = true) @RequestParam("userActionIds") List<Long> userActionIds);

View File

@@ -33,14 +33,14 @@ public class PecMailController implements PecMailApi {
private PecMailService pecMailService;
@Override
public ResponseEntity<Response<PecMailResponse>> sendPecMail(HttpServletRequest request,List<Long> userActionIds) {
public ResponseEntity<Response< List<PecMailResponse>>> sendPecMail(HttpServletRequest request,List<Long> userActionIds) {
loggingUtil.logUserAction(UserActionRequest.builder().request(request).actionType(UserActionLogsEnum.EMAIL)
.actionContext(UserActionContextEnum.SEND_PEC_MAIL).build());
// PecMailResponse pecMailResponse=pecMailService.sendPecMail(request,userActionId);
List<PecMailResponse> pecMailResponse=pecMailService.sendPecMail(request,userActionIds);
return ResponseEntity.status(HttpStatus.OK)
.body(new Response<>(null, Status.SUCCESS, Translator.toLocale(GepafinConstant.MAIL_SENT_SUCCESSFULLY)));
.body(new Response<>(pecMailResponse, Status.SUCCESS, Translator.toLocale(GepafinConstant.MAIL_SENT_SUCCESSFULLY)));
}