|
@@ -150,7 +150,7 @@ public class OrgServiceImpl implements OrgService {
|
|
|
dataSyncCloudService.syncOrg(req);
|
|
|
}
|
|
|
|
|
|
- saveOrgProperties(properties, saved);
|
|
|
+ saveOrgProperties(saved.getId(), properties);
|
|
|
|
|
|
return saved;
|
|
|
}
|
|
@@ -244,29 +244,21 @@ public class OrgServiceImpl implements OrgService {
|
|
|
dataSyncCloudService.syncOrg(req);
|
|
|
}
|
|
|
|
|
|
- saveOrgProperties(properties, saved);
|
|
|
+ saveOrgProperties(saved.getId(), properties);
|
|
|
|
|
|
return saved;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 保存机构属性
|
|
|
- *
|
|
|
- * @author WANGWEI
|
|
|
- * @param properties
|
|
|
- * @param saved
|
|
|
- */
|
|
|
@Override
|
|
|
- public void saveOrgProperties(Map<String, String> properties, OrgEntity saved) {
|
|
|
+ public void saveOrgProperties(Long orgId, Map<String, String> properties) {
|
|
|
Map<DynamicEnum, String> map = checkAndGetOrgProperties(properties);
|
|
|
for (Entry<DynamicEnum, String> entry : map.entrySet()) {
|
|
|
DynamicEnum de = entry.getKey();
|
|
|
String value = entry.getValue();
|
|
|
- OrgPropertyEntity entity = orgPropertyRepo.findByOrgIdAndKeyId(saved.getId(),
|
|
|
- de.getId());
|
|
|
+ OrgPropertyEntity entity = orgPropertyRepo.findByOrgIdAndKeyId(orgId, de.getId());
|
|
|
if (null == entity) {
|
|
|
entity = new OrgPropertyEntity();
|
|
|
- entity.setOrgId(saved.getId());
|
|
|
+ entity.setOrgId(orgId);
|
|
|
entity.setKeyId(de.getId());
|
|
|
}
|
|
|
entity.setValue(value);
|