From 1103a89e710c5c377fe0e8c5135dba3942da9d7e Mon Sep 17 00:00:00 2001 From: xxx Date: Thu, 21 Sep 2023 13:51:28 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E9=85=8D=E7=BD=AE=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=BF=94=E5=9B=9E=E9=83=A8=E9=97=A8=E5=92=8C=E5=88=86?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/controller/backend/SystemController.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/playedu-api/src/main/java/xyz/playedu/api/controller/backend/SystemController.java b/playedu-api/src/main/java/xyz/playedu/api/controller/backend/SystemController.java index 6ecfcd0..759e0f6 100644 --- a/playedu-api/src/main/java/xyz/playedu/api/controller/backend/SystemController.java +++ b/playedu-api/src/main/java/xyz/playedu/api/controller/backend/SystemController.java @@ -17,6 +17,7 @@ package xyz.playedu.api.controller.backend; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -25,6 +26,8 @@ import xyz.playedu.common.annotation.Log; import xyz.playedu.common.constant.BusinessTypeConstant; import xyz.playedu.common.constant.ConfigConstant; import xyz.playedu.common.context.BCtx; +import xyz.playedu.common.service.CategoryService; +import xyz.playedu.common.service.DepartmentService; import xyz.playedu.common.types.JsonResponse; import xyz.playedu.common.util.RequestUtil; @@ -38,6 +41,10 @@ import java.util.Map; @Slf4j public class SystemController { + @Autowired private DepartmentService departmentService; + + @Autowired private CategoryService categoryService; + @GetMapping("/config") @Log(title = "其它-系统配置", businessType = BusinessTypeConstant.GET) public JsonResponse config() { @@ -78,6 +85,12 @@ public class SystemController { // LDAP登录 data.put("ldap-enabled", "1".equals(configData.get(ConfigConstant.LDAP_ENABLED))); + // 全部部门 + data.put("departments", departmentService.groupByParent()); + + // 全部资源分类 + data.put("resource_categories", categoryService.groupByParent()); + return JsonResponse.data(data); } }