|
@@ -97,6 +97,13 @@ public class OrgServiceImpl implements OrgService {
|
|
|
throw new StatusException("B-150002", "name is null");
|
|
|
}
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(domainName)) {
|
|
|
+ OrgEntity tempOrg = orgRepo.findByParentIdIsNullAndDomainName(domainName);
|
|
|
+ if (null != tempOrg && !tempOrg.getCode().equals(code)) {
|
|
|
+ throw new StatusException("B-150004", "域名被占用");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (null == enable) {
|
|
|
enable = true;
|
|
|
}
|
|
@@ -123,13 +130,6 @@ public class OrgServiceImpl implements OrgService {
|
|
|
orgEntity.setDomainName(domainName);
|
|
|
orgEntity.setRemark(remark);
|
|
|
|
|
|
- if (StringUtils.isNotBlank(domainName)) {
|
|
|
- OrgEntity tempOrg = orgRepo.findByParentIdIsNullAndDomainName(domainName);
|
|
|
- if (null != tempOrg && !tempOrg.getId().equals(orgEntity.getId())) {
|
|
|
- throw new StatusException("B-150004", "域名被占用");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
OrgEntity saved = orgRepo.save(orgEntity);
|
|
|
|
|
|
Map<DynamicEnum, String> map = checkAndGetOrgProperties(properties);
|