diff --git a/test/src/test/java/org/apache/seata/saga/annotation/NormalSagaAnnotationAction.java b/test/src/test/java/org/apache/seata/saga/annotation/NormalSagaAnnotationAction.java index da6e05e3771..11aadcb88f7 100644 --- a/test/src/test/java/org/apache/seata/saga/annotation/NormalSagaAnnotationAction.java +++ b/test/src/test/java/org/apache/seata/saga/annotation/NormalSagaAnnotationAction.java @@ -17,7 +17,6 @@ package org.apache.seata.saga.annotation; import org.apache.seata.rm.tcc.api.BusinessActionContext; -import org.apache.seata.rm.tcc.api.BusinessActionContextParameter; import java.util.List; @@ -27,10 +26,7 @@ public interface NormalSagaAnnotationAction { - boolean commit(BusinessActionContext actionContext, - @BusinessActionContextParameter("a") int a, - @BusinessActionContextParameter(paramName = "b", index = 0) List b, - @BusinessActionContextParameter(isParamInProperty = true) SagaParam sagaParam); + boolean commit(BusinessActionContext actionContext, int a, List b, SagaParam sagaParam); /** * Rollback boolean. @@ -38,5 +34,5 @@ boolean commit(BusinessActionContext actionContext, * @param actionContext the action context * @return the boolean */ - boolean compensation(BusinessActionContext actionContext, @BusinessActionContextParameter("sagaParam") SagaParam param); + boolean compensation(BusinessActionContext actionContext, SagaParam param); } \ No newline at end of file diff --git a/test/src/test/java/org/apache/seata/saga/annotation/NormalSagaAnnotationActionImpl.java b/test/src/test/java/org/apache/seata/saga/annotation/NormalSagaAnnotationActionImpl.java index 56d9a68febd..6062cce4597 100644 --- a/test/src/test/java/org/apache/seata/saga/annotation/NormalSagaAnnotationActionImpl.java +++ b/test/src/test/java/org/apache/seata/saga/annotation/NormalSagaAnnotationActionImpl.java @@ -16,10 +16,12 @@ */ package org.apache.seata.saga.annotation; -import java.util.List; import org.apache.seata.rm.tcc.api.BusinessActionContext; +import org.apache.seata.rm.tcc.api.BusinessActionContextParameter; import org.apache.seata.saga.rm.api.CompensationBusinessAction; +import java.util.List; + /** * */ @@ -30,13 +32,13 @@ public class NormalSagaAnnotationActionImpl implements NormalSagaAnnotationActio @Override @CompensationBusinessAction(name = "sagaActionForTest", compensationMethod = "compensation", compensationArgsClasses = {BusinessActionContext.class, SagaParam.class}) - public boolean commit(BusinessActionContext actionContext, int a, List b, SagaParam sagaParam) { + public boolean commit(BusinessActionContext actionContext, @BusinessActionContextParameter("a") int a, @BusinessActionContextParameter(paramName = "b", index = 0) List b, @BusinessActionContextParameter(isParamInProperty = true) SagaParam sagaParam) { isCommit = true; return a > 1; } @Override - public boolean compensation(BusinessActionContext actionContext, SagaParam param) { + public boolean compensation(BusinessActionContext actionContext, @BusinessActionContextParameter("sagaParam") SagaParam param) { isCommit = false; return true; }