fix(ops): 修复改为分步构建责任链-不构建队列bug
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled

This commit is contained in:
lzh
2026-01-31 00:08:43 +08:00
parent 4d34951799
commit b95674b9e0
2 changed files with 5 additions and 5 deletions

View File

@@ -81,10 +81,10 @@ public class OrderLifecycleManagerImpl implements OrderLifecycleManager {
@PostConstruct
public void init() {
// 构建责任链
responsibilityChain = stateTransitionHandler
.setNext(queueSyncHandler)
.setNext(eventPublishHandler);
// 构建责任链(分步构建,避免 setNext 返回 this 导致的链式调用问题)
stateTransitionHandler.setNext(queueSyncHandler);
queueSyncHandler.setNext(eventPublishHandler);
responsibilityChain = stateTransitionHandler;
log.info("生命周期管理器责任链已构建: StateTransitionHandler -> QueueSyncHandler -> EventPublishHandler");
}

View File

@@ -18,7 +18,7 @@ public abstract class TransitionHandler {
protected TransitionHandler next;
/**
* 设置<EFBFBD><EFBFBD><EFBFBD>一个处理器
* 设置一个处理器
*
* @param next 下一个处理器
* @return this