Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for setting read status to false #791

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ public CredentialRequestStatusResponseDto getStatus(String requestId) {
return credentialRequestStatusResponseDto;
}

public CredentialReqestDto prepareCredentialRequest(ResidentCredentialRequestDto residentCreDto, String individualId) {
private CredentialReqestDto prepareCredentialRequest(ResidentCredentialRequestDto residentCreDto, String individualId) {
CredentialReqestDto crDto = new CredentialReqestDto();
if(Utility.isSecureSession()){
crDto.setId(individualId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@ public void updateAuthTypeStatus(EventModel eventModel) throws ResidentServiceCh
auditUtil.setAuditRequestDto(EventEnum.UPDATE_AUTH_TYPE_STATUS);
try{
logger.info( "WebSubUpdateAuthTypeServiceImpl::updateAuthTypeStatus()::partnerId");
String eventId = insertInResidentTransactionTable(eventModel,"COMPLETED");
String eventId = updateInResidentTransactionTable(eventModel,"COMPLETED");
sendNotificationV2(TemplateType.SUCCESS,eventId);
}
catch (Exception e) {
logger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.APPLICATIONID.toString(),
LoggerFileConstant.APPLICATIONID.toString(), "WebSubUpdateAuthTypeServiceImpl::updateAuthTypeStatus()::exception");
String eventId = insertInResidentTransactionTable(eventModel,"FAILED");
String eventId = updateInResidentTransactionTable(eventModel,"FAILED");
sendNotificationV2(TemplateType.FAILURE, eventId);
throw new ResidentServiceCheckedException(ResidentErrorCode.RESIDENT_WEBSUB_UPDATE_AUTH_TYPE_FAILED.getErrorCode(),
ResidentErrorCode.RESIDENT_WEBSUB_UPDATE_AUTH_TYPE_FAILED.getErrorMessage(), e);
}
}

private String insertInResidentTransactionTable(EventModel eventModel, String status) {
private String updateInResidentTransactionTable(EventModel eventModel, String status) {

logger.debug(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.APPLICATIONID.toString(),
LoggerFileConstant.APPLICATIONID.toString(), "WebSubUpdateAuthTypeServiceImpl::insertInResidentTransactionTable()::entry");
Expand All @@ -76,6 +76,7 @@ private String insertInResidentTransactionTable(EventModel eventModel, String s
if(residentTransactionEntity!=null){
residentTransactionEntity.stream().forEach(residentTransactionEntity1 -> {
residentTransactionEntity1.setStatusCode(status);
residentTransactionEntity1.setReadStatus(false);
});
residentTransactionRepository.saveAll(residentTransactionEntity);
}
Expand Down