fix(ops): 修复区域路径拼接重复问题

在构建区域完整路径时,跳过当前区域ID,避免parentPath中
包含当前区域时导致名称重复拼接

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude (MiniMax-M2.1) <noreply@anthropic.com>
This commit is contained in:
lzh
2026-01-30 00:17:38 +08:00
parent fee974912e
commit 260d4b8220

View File

@@ -447,9 +447,13 @@ public class CleanOrderServiceImpl implements CleanOrderService {
Map<Long, OpsBusAreaDO> parentMap = parents.stream()
.collect(Collectors.toMap(OpsBusAreaDO::getId, Function.identity()));
// 按 parentPath 顺序拼接
// 按 parentPath 顺序拼接(排除当前区域)
StringBuilder sb = new StringBuilder();
for (Long pid : parentIdList) {
// 跳过当前区域,避免重复拼接
if (pid.equals(areaId)) {
continue;
}
OpsBusAreaDO parent = parentMap.get(pid);
if (parent != null) {
sb.append(parent.getAreaName());