|
@@ -207,14 +207,24 @@ public class OrgCloudServiceProvider extends ControllerSupport implements OrgClo
|
|
|
@Override
|
|
|
public GetOrgPropertyResp getOrgProperty(@RequestBody GetOrgPropertyReq req) {
|
|
|
Long orgId = req.getOrgId();
|
|
|
- String key = req.getKey();
|
|
|
+ Long keyId = req.getKeyId();
|
|
|
+ String keyName = req.getKeyName();
|
|
|
+
|
|
|
OrgEntity orgEntity = orgRepo.findOne(orgId);
|
|
|
if (null == orgEntity) {
|
|
|
throw new StatusException("B-001250", "orgId is wrong");
|
|
|
}
|
|
|
|
|
|
DynamicEnumManager manager = OrgProperty.getDynamicEnumManager();
|
|
|
- DynamicEnum de = manager.getByName(key);
|
|
|
+ DynamicEnum de = null;
|
|
|
+ if (null != keyId) {
|
|
|
+ de = manager.getById(keyId);
|
|
|
+ } else if (null != keyName) {
|
|
|
+ de = manager.getByName(keyName);
|
|
|
+ } else {
|
|
|
+ throw new StatusException("B-001252", "keyId,keyName can not be all null");
|
|
|
+ }
|
|
|
+
|
|
|
OrgPropertyEntity one = orgPropertyRepo.findByOrgIdAndKeyId(orgId, de.getId());
|
|
|
if (null == one) {
|
|
|
return null;
|