From d1cf7a1939ebc4ccd3d80a7ee633e7e0736a797c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A3=B7=E5=8F=B6?= <14103883+leaf-phos@user.noreply.gitee.com> Date: Mon, 24 Feb 2025 15:25:37 +0800 Subject: [PATCH] =?UTF-8?q?0.5.2=20=E4=BF=AE=E5=A4=8D=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E7=9C=8B=E4=B8=8D=E8=A7=81=E6=95=B0=E6=8D=AE=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/web/dashboard/DashboardController.java | 2 ++ .../ruoyi/web/dashboard/DashboardProjectController.java | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardController.java b/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardController.java index c4c11ee..a4c8bf9 100644 --- a/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardController.java +++ b/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardController.java @@ -1,6 +1,7 @@ package com.ruoyi.web.dashboard; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -19,6 +20,7 @@ public class DashboardController extends BaseController { // 获取统计数据 @GetMapping("/brief") + @PreAuthorize("@ss.hasPermi('dashboard:brief')") public AjaxResult brief(BriefQuery query) { query.setScope(true); return AjaxResult.success(dashboardService.selectBrief(query)); diff --git a/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardProjectController.java b/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardProjectController.java index 934f243..0e9e5da 100644 --- a/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardProjectController.java +++ b/ruoyi-web/src/main/java/com/ruoyi/web/dashboard/DashboardProjectController.java @@ -1,6 +1,7 @@ package com.ruoyi.web.dashboard; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -13,22 +14,24 @@ import com.ruoyi.dashboard.project.service.DashboardProjectService; @RestController @RequestMapping("/dashboard/project") public class DashboardProjectController { - + @Autowired private DashboardProjectService dashboardProjectService; // 获取每月项目数和完成数的数据 @GetMapping("/month") + @PreAuthorize("@ss.hasPermi('dashboard:project:month')") public AjaxResult month(MonthProjectQuery query) { return AjaxResult.success(dashboardProjectService.selectMonthProject(query)); } // 获取项目比率 @GetMapping("/rate") + @PreAuthorize("@ss.hasPermi('dashboard:project:rate')") public AjaxResult rate() { return AjaxResult.success(dashboardProjectService.selectProjectRate()); } - + }