|
@@ -581,12 +581,24 @@ public class OrgController extends ControllerSupport {
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "查询机构单个属性(不鉴权)")
|
|
@ApiOperation(value = "查询机构单个属性(不鉴权)")
|
|
- @GetMapping("propertyNoSession/{orgId}/{key}")
|
|
|
|
- public String getOrgPropertyNoSession(@PathVariable Long orgId, @PathVariable String key) {
|
|
|
|
- OrgEntity orgEntity = orgRepo.findOne(orgId);
|
|
|
|
- if (null == orgEntity) {
|
|
|
|
- throw new StatusException("B-001250", "orgId is wrong");
|
|
|
|
|
|
+ @GetMapping("propertyNoSession/{key}")
|
|
|
|
+ public String getOrgPropertyNoSession(@RequestParam(required = false) Long orgId,
|
|
|
|
+ @RequestParam(required = false) String domainName, @PathVariable String key) {
|
|
|
|
+ OrgEntity orgEntity = null;
|
|
|
|
+ if (null != orgId) {
|
|
|
|
+ orgEntity = orgRepo.findOne(orgId);
|
|
|
|
+ if (null == orgEntity) {
|
|
|
|
+ throw new StatusException("B-001250", "orgId is wrong");
|
|
|
|
+ }
|
|
|
|
+ } else if (StringUtils.isNotBlank(domainName)) {
|
|
|
|
+ orgEntity = orgRepo.findByParentIdIsNullAndDomainName(domainName);
|
|
|
|
+ if (null == orgEntity) {
|
|
|
|
+ throw new StatusException("B-001252", "domainName is wrong");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ throw new StatusException("B-001253", "orgId and domainName are all null");
|
|
}
|
|
}
|
|
|
|
+
|
|
DynamicEnumManager manager = OrgProperty.getDynamicEnumManager();
|
|
DynamicEnumManager manager = OrgProperty.getDynamicEnumManager();
|
|
DynamicEnum de = manager.getByName(key);
|
|
DynamicEnum de = manager.getByName(key);
|
|
OrgPropertyEntity one = orgPropertyRepo.findByOrgIdAndKeyId(orgId, de.getId());
|
|
OrgPropertyEntity one = orgPropertyRepo.findByOrgIdAndKeyId(orgId, de.getId());
|