mirror of
https://gitee.com/dromara/Raincat.git
synced 2024-11-29 18:38:55 +08:00
Merge pull request #25 from 81519434/fix_primary_key_error
修复补偿纪录插入可能会爆 主键重复 的问题
This commit is contained in:
commit
1d86772916
@ -24,6 +24,7 @@ import com.raincat.common.constant.CommonConstant;
|
||||
import com.raincat.common.enums.CompensationActionEnum;
|
||||
import com.raincat.common.enums.CompensationOperationTypeEnum;
|
||||
import com.raincat.common.enums.TransactionStatusEnum;
|
||||
import com.raincat.common.holder.IdWorkerUtils;
|
||||
import com.raincat.core.disruptor.publisher.TxTransactionEventPublisher;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -57,7 +58,7 @@ public class TxCompensationManager {
|
||||
TransactionRecover recover = new TransactionRecover();
|
||||
recover.setRetriedCount(1);
|
||||
recover.setStatus(TransactionStatusEnum.BEGIN.getCode());
|
||||
recover.setId(groupId);
|
||||
recover.setId(String.valueOf(IdWorkerUtils.getInstance().randomUUID()));
|
||||
recover.setTransactionInvocation(invocation);
|
||||
recover.setGroupId(groupId);
|
||||
recover.setTaskId(taskId);
|
||||
|
Loading…
Reference in New Issue
Block a user