|
@@ -715,4 +715,21 @@ public class DataStrategyImpl implements DataStrategy {
|
|
|
diagramMapper.updateById(entity);
|
|
|
return true;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 判断系统图名称是否重复
|
|
|
+ *
|
|
|
+ * @param name 系统图名称
|
|
|
+ * @return 是否重复
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public boolean judgeNameDuplicate(String name) {
|
|
|
+ if (StrUtil.isBlank(name)) {
|
|
|
+ throw new BusinessException(ResponseCode.A0400.getCode(), "名称参数为空");
|
|
|
+ }
|
|
|
+ BdtpRequest req = BdtpRequest.getCurrent();
|
|
|
+ String projectId = req.getProjectId();
|
|
|
+ List<DiagramEntity> diagramEntities = diagramMapper.selectByName(projectId, name);
|
|
|
+ return CollectionUtil.isNotEmpty(diagramEntities);
|
|
|
+ }
|
|
|
}
|