REQ-3581: 返回幂等信息
This commit is contained in:
parent
09f6c18716
commit
36e34c7728
@ -155,7 +155,7 @@ public class EssContract extends BaseEntity<EssContract> {
|
||||
}
|
||||
|
||||
public boolean shouldDownloadContract() {
|
||||
return isFinalState() || getOrCreateExt().isShouldDownloadContract();
|
||||
return isFinalState() || getOrCreateExt().isSaveContractSnapshot();
|
||||
}
|
||||
|
||||
public boolean isFinalState() {
|
||||
@ -174,7 +174,7 @@ public class EssContract extends BaseEntity<EssContract> {
|
||||
@Setter
|
||||
@Getter
|
||||
public static class RecordExt {
|
||||
private boolean shouldDownloadContract;
|
||||
private boolean saveContractSnapshot;
|
||||
}
|
||||
|
||||
// @formatter:off
|
||||
|
||||
@ -180,7 +180,7 @@ public class EssService {
|
||||
public void saveContractSnapshot(SaveContractSnapshotRequest request) {
|
||||
essLogDao.logRequest("saveContractSnapshot", request.getEssContractId(), request);
|
||||
EssContract contract = essContractDao.getOrThrow(request.getEssContractId());
|
||||
contract.getOrCreateExt().setShouldDownloadContract(true);
|
||||
contract.getOrCreateExt().setSaveContractSnapshot(true);
|
||||
essContractDao.updateExt(contract);
|
||||
maybeScheduleDownloadContractPDF(contract, request.isRetryDownload());
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user