|
|
@@ -170,8 +170,11 @@ public class OrganizationServiceImpl extends SuperService implements Organizatio
|
|
|
organization.setRemark(param.getRemark());
|
|
|
|
|
|
initUpdateEntity(organization);
|
|
|
+ if (StringUtils.isEmpty(organization.getProjectOid())) {
|
|
|
+ organization.setProjectOid(organization.getOid());
|
|
|
+ }
|
|
|
organizationDao.save(organization);
|
|
|
-
|
|
|
+ // 编辑权限中心的机构信息
|
|
|
authCenterUpdateOrgInfo(organization.getProjectOid(), organization.getName(), organization.getAuthType(), organization.getRemark());
|
|
|
} else {
|
|
|
if (ObjectUtils.isNotEmpty(nameOrganization)) {
|
|
|
@@ -296,14 +299,14 @@ public class OrganizationServiceImpl extends SuperService implements Organizatio
|
|
|
organizationModel.setRemark(remark);
|
|
|
com.github.microservice.auth.client.content.ResultContent<String> resultContent = organizationService.add(organizationModel);
|
|
|
if (resultContent.getState() == ResultState.Success) {
|
|
|
- log.info("平台初始成功: {}", resultContent.getContent());
|
|
|
+ log.info("机构添加: {}", resultContent.getContent());
|
|
|
oid = resultContent.getContent();
|
|
|
} else {
|
|
|
String msg = resultContent.getMsg();
|
|
|
if (StringUtils.isEmpty(msg) && resultContent.getException() != null) {
|
|
|
msg = resultContent.getException().getMessage();
|
|
|
}
|
|
|
- log.info("initSuperOrganization {}", msg);
|
|
|
+ log.info("authCenterAddOrgInfo {}", msg);
|
|
|
return ResultContent.buildFail(msg);
|
|
|
}
|
|
|
return ResultContent.buildSuccess(oid);
|
|
|
@@ -315,16 +318,17 @@ public class OrganizationServiceImpl extends SuperService implements Organizatio
|
|
|
organizationModel.setName(name);
|
|
|
organizationModel.setAuthType(authType);
|
|
|
organizationModel.setRemark(remark);
|
|
|
- com.github.microservice.auth.client.content.ResultContent<String> resultContent = organizationService.add(organizationModel);
|
|
|
+ organizationModel.setId(id);
|
|
|
+ com.github.microservice.auth.client.content.ResultContent<String> resultContent = organizationService.update(organizationModel);
|
|
|
if (resultContent.getState() == ResultState.Success) {
|
|
|
- log.info("平台初始成功: {}", resultContent.getContent());
|
|
|
+ log.info("机构编辑成功: {}", resultContent.getContent());
|
|
|
oid = resultContent.getContent();
|
|
|
} else {
|
|
|
String msg = resultContent.getMsg();
|
|
|
if (StringUtils.isEmpty(msg) && resultContent.getException() != null) {
|
|
|
msg = resultContent.getException().getMessage();
|
|
|
}
|
|
|
- log.info("initSuperOrganization {}", msg);
|
|
|
+ log.info("authCenterUpdateOrgInfo error: {}", msg);
|
|
|
return ResultContent.buildFail(msg);
|
|
|
}
|
|
|
return ResultContent.buildSuccess(oid);
|