fix: 代码生成器 自定义模板 编辑
This commit is contained in:
@@ -112,8 +112,9 @@ public class UserTemplateServiceImpl implements IUserTemplateService {
|
||||
throw new RuntimeException("无权限修改此模板");
|
||||
}
|
||||
|
||||
// 检查模板名称是否存在
|
||||
if (checkTemplateNameExists(currentUserId, dto.getTemplateName(), dto.getId())) {
|
||||
// 检查模板名称是否存在(只在名称发生变化时才检查)
|
||||
if (!existTemplate.getTemplateName().equals(dto.getTemplateName()) &&
|
||||
checkTemplateNameExists(currentUserId, dto.getTemplateName(), dto.getId())) {
|
||||
throw new RuntimeException("模板名称已存在");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user