0.5.2 修复首页看不见数据的问题

This commit is contained in:
磷叶 2025-02-24 15:25:37 +08:00
parent 0c21bcabf9
commit d1cf7a1939
2 changed files with 7 additions and 2 deletions

View File

@ -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));

View File

@ -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());
}
}