WANG 6 年之前
父节点
当前提交
433de58f9b

+ 18 - 0
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/OrgController.java

@@ -580,6 +580,24 @@ public class OrgController extends ControllerSupport {
 		return one.getValue();
 	}
 
+	@ApiOperation(value = "查询机构单个属性(不鉴权)")
+	@GetMapping("propertyNoession/{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");
+		}
+		validateRootOrgIsolation(orgEntity.getRootId());
+
+		DynamicEnumManager manager = OrgProperty.getDynamicEnumManager();
+		DynamicEnum de = manager.getByName(key);
+		OrgPropertyEntity one = orgPropertyRepo.findByOrgIdAndKeyId(orgId, de.getId());
+		if (null == one) {
+			return null;
+		}
+		return one.getValue();
+	}
+
 	/**
 	 * 方法注释
 	 *