|
@@ -637,10 +637,7 @@ public class OrgController extends ControllerSupport {
|
|
|
return properties;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "上传机构属性集合至upyun")
|
|
|
- @PostMapping("uploadOrgProperties2Upyun/{orgId}/{propertyGroupId}")
|
|
|
- public List<String> uploadOrgProperties2Upyun(@PathVariable Long orgId,
|
|
|
- @PathVariable String propertyGroupId) {
|
|
|
+ private List<String> uploadOrgProperties2Upyun(Long orgId, String propertyGroupId) {
|
|
|
Map<String, String> properties = getOrgPropertiesByGroup(orgId, propertyGroupId);
|
|
|
|
|
|
OrgEntity orgEntity = GlobalHelper.getEntity(orgRepo, orgId, OrgEntity.class);
|
|
@@ -1024,12 +1021,22 @@ public class OrgController extends ControllerSupport {
|
|
|
public void saveOrgProperties(@RequestBody SaveOrgPropertiesDomain domain) {
|
|
|
Long orgId = domain.getOrgId();
|
|
|
Map<String, String> properties = domain.getProperties();
|
|
|
+ List<String> relatedPropertyGroupIdList = domain.getRelatedPropertyGroupIdList();
|
|
|
|
|
|
OrgEntity orgEntity = GlobalHelper.getPresentEntity(orgRepo, orgId, OrgEntity.class);
|
|
|
|
|
|
validateRootOrgIsolation(orgEntity.getRootId());
|
|
|
|
|
|
orgService.saveOrgProperties(orgEntity.getId(), properties);
|
|
|
+
|
|
|
+ for (String propertyGroupId : relatedPropertyGroupIdList) {
|
|
|
+ // 删除缓存
|
|
|
+ String redisKey = "PROPERTIES_BY_GROUP:" + orgId + ":" + propertyGroupId;
|
|
|
+ redisClient.delete(redisKey);
|
|
|
+
|
|
|
+ // 上传upyun
|
|
|
+ uploadOrgProperties2Upyun(orgId, propertyGroupId);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|