mirror of
https://gitee.com/dromara/Raincat.git
synced 2024-12-03 12:29:08 +08:00
事务补偿控制
This commit is contained in:
parent
39fc963336
commit
c2f25c0a9b
@ -18,6 +18,7 @@
|
||||
|
||||
package com.raincat.common.bean.adapter;
|
||||
|
||||
import com.raincat.common.enums.CompensationOperationTypeEnum;
|
||||
import com.raincat.common.enums.TransactionStatusEnum;
|
||||
import lombok.Data;
|
||||
|
||||
@ -85,5 +86,14 @@ public class TransactionRecoverAdapter {
|
||||
*/
|
||||
private String targetMethod;
|
||||
|
||||
/***
|
||||
* 任务完成标志
|
||||
*/
|
||||
private String completeFlag;
|
||||
|
||||
/**
|
||||
* 日志更新操作 {@link CompensationOperationTypeEnum }
|
||||
*/
|
||||
private int operation;
|
||||
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ import com.raincat.common.serializer.ObjectSerializer;
|
||||
|
||||
/**
|
||||
* TransactionRecoverUtils.
|
||||
*
|
||||
* @author xiaoyu(Myth)
|
||||
*/
|
||||
public class TransactionRecoverUtils {
|
||||
@ -44,6 +45,8 @@ public class TransactionRecoverUtils {
|
||||
adapter.setCreateTime(transactionRecover.getCreateTime());
|
||||
adapter.setContents(objectSerializer.serialize(transactionInvocation));
|
||||
adapter.setVersion(transactionRecover.getVersion());
|
||||
adapter.setCompleteFlag(transactionRecover.getCompleteFlag());
|
||||
adapter.setOperation(transactionRecover.getOperation());
|
||||
return objectSerializer.serialize(adapter);
|
||||
}
|
||||
|
||||
@ -58,6 +61,8 @@ public class TransactionRecoverUtils {
|
||||
transactionRecover.setTaskId(adapter.getTaskId());
|
||||
transactionRecover.setStatus(adapter.getStatus());
|
||||
transactionRecover.setVersion(adapter.getVersion());
|
||||
transactionRecover.setCompleteFlag(adapter.getCompleteFlag());
|
||||
transactionRecover.setOperation(adapter.getOperation());
|
||||
return transactionRecover;
|
||||
}
|
||||
|
||||
@ -74,6 +79,8 @@ public class TransactionRecoverUtils {
|
||||
transactionRecover.setStatus(adapter.getStatus());
|
||||
transactionRecover.setTransactionInvocation(transactionInvocation);
|
||||
transactionRecover.setVersion(adapter.getVersion());
|
||||
transactionRecover.setCompleteFlag(adapter.getCompleteFlag());
|
||||
transactionRecover.setOperation(adapter.getOperation());
|
||||
return transactionRecover;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user