-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MOSIP-22192_modified update verification code (#1541)
* Release-fix * # WARNING: head commit changed in the meantime Merge branch '1.1.5.6' of https://github.com/mosip/registration.git into 1.1.5.6 * MOSIP-22192 Co-authored-by: M1030448 <M1030448@MT-2G2B2B3>
- Loading branch information
1 parent
3b6df88
commit 47dfd87
Showing
4 changed files
with
65 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...osip/registration/processor/manual/verification/util/ManualVerificationUpdateUtility.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package io.mosip.registration.processor.manual.verification.util; | ||
|
||
import java.sql.Timestamp; | ||
import java.util.List; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Component; | ||
import org.springframework.transaction.annotation.Propagation; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
import io.mosip.kernel.core.logger.spi.Logger; | ||
import io.mosip.kernel.core.util.DateUtils; | ||
import io.mosip.registration.processor.core.constant.LoggerFileConstant; | ||
import io.mosip.registration.processor.core.logger.RegProcessorLogger; | ||
import io.mosip.registration.processor.manual.verification.dto.ManualVerificationStatus; | ||
import io.mosip.registration.processor.packet.storage.entity.ManualVerificationEntity; | ||
import io.mosip.registration.processor.packet.storage.repository.BasePacketRepository; | ||
|
||
@Component | ||
@Transactional(propagation=Propagation.REQUIRES_NEW) | ||
public class ManualVerificationUpdateUtility { | ||
/** The logger. */ | ||
private static Logger regProcLogger = RegProcessorLogger.getLogger(ManualVerificationUpdateUtility.class); | ||
|
||
/** The base packet repository. */ | ||
@Autowired | ||
private BasePacketRepository<ManualVerificationEntity, String> basePacketRepository; | ||
|
||
/** | ||
* Update manual verification entity once request is pushed to queue for a given | ||
* RID | ||
*/ | ||
public void updateManualVerificationEntityRID(List<ManualVerificationEntity> mves, String requestId) { | ||
mves.stream().forEach(mve -> { | ||
regProcLogger.debug(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), | ||
mve.getId().getRegId(), "ManualVerificationUpdateUtility::updateManualVerificationEntityRID()::entry"); | ||
mve.setStatusCode(ManualVerificationStatus.INQUEUE.name()); | ||
mve.setStatusComment("Sent to manual adjudication queue"); | ||
mve.setUpdDtimes(Timestamp.valueOf(DateUtils.getUTCCurrentDateTime())); | ||
mve.setRequestId(requestId); | ||
basePacketRepository.update(mve); | ||
regProcLogger.debug(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), | ||
mve.getId().getRegId(), "ManualVerificationUpdateUtility::updateManualVerificationEntityRID()::exit"); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters