完善了重命名逻辑,避免相同名字冲突

This commit is contained in:
zhangyuheng 2024-05-25 22:22:20 +08:00
parent a0bfb00f4a
commit ee2cd3f99b
1 changed files with 4 additions and 0 deletions

View File

@ -527,6 +527,10 @@ public class DominionController {
Dominion.notification.error(operator, "领地名称不能包含空格");
return;
}
if (Objects.equals(old_name, new_name)) {
Dominion.notification.error(operator, "新名称与旧名称相同");
return;
}
DominionDTO dominion = getExistDomAndIsOwner(operator, old_name);
if (dominion == null) {
return;