From 0bb59eb5b0adb255f3c8f7db76d30199072edc8f Mon Sep 17 00:00:00 2001 From: yanglin Date: Tue, 18 Mar 2025 10:03:56 +0800 Subject: [PATCH] =?UTF-8?q?REQ-3540:=20=E6=B7=BB=E5=8A=A0=E5=89=AF?= =?UTF-8?q?=E6=9C=AC=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/axzo/nanopart/doc/file/index/IndexSupport.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/doc-server/src/main/java/cn/axzo/nanopart/doc/file/index/IndexSupport.java b/doc/doc-server/src/main/java/cn/axzo/nanopart/doc/file/index/IndexSupport.java index 766212a4..002f61ad 100644 --- a/doc/doc-server/src/main/java/cn/axzo/nanopart/doc/file/index/IndexSupport.java +++ b/doc/doc-server/src/main/java/cn/axzo/nanopart/doc/file/index/IndexSupport.java @@ -101,7 +101,7 @@ class IndexSupport { List nameLikeNodes = indexNodeDao.findValidChildrenNameRightLike(parentScope, rename); if (nameLikeNodes.size() == 1 && IndexNode.idEquals(rename, nameLikeNodes.get(0))) return; - Pattern pattern = Pattern.compile(Pattern.quote(rename.getName()) + "\\((\\d+)\\)"); + Pattern pattern = Pattern.compile(Pattern.quote(rename.getName()) + "\\(副本(\\d+)\\)"); int maxSeq = 0; for (IndexNode indexNode : nameLikeNodes) { if (indexNode.getId().equals(rename.getId())) @@ -113,7 +113,7 @@ class IndexSupport { maxSeq = seq; } } - String newName = String.format("%s(%d)", rename.getName(), maxSeq == 0 ? 1 : maxSeq + 1); + String newName = String.format("%s(副本%d)", rename.getName(), maxSeq == 0 ? 1 : maxSeq + 1); indexNodeDao.rename(rename.getCode(), newName); }