From bfc36b71d1afcb5fae4f96eab337186ecf20c50f Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Mon, 18 Nov 2024 17:53:38 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=B7=A5=E4=BD=9C=E5=8F=B0):=20=E7=BC=BA?= =?UTF-8?q?=E9=99=B7=E5=88=97=E8=A1=A8=E9=83=A8=E5=88=86=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E7=9A=84=E6=9D=83=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1048989 --user=宋昌昌 【工作台】待办-用户无缺陷的查询权限-待办页显示暂无资源权限 https://www.tapd.cn/55049933/s/1611501 --- .../controller/DashboardController.java | 18 ++++++++++++++++++ .../dashboard/controller/ToDoController.java | 3 --- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/backend/services/dashboard/src/main/java/io/metersphere/dashboard/controller/DashboardController.java b/backend/services/dashboard/src/main/java/io/metersphere/dashboard/controller/DashboardController.java index f9950d4788..e0b39a1393 100644 --- a/backend/services/dashboard/src/main/java/io/metersphere/dashboard/controller/DashboardController.java +++ b/backend/services/dashboard/src/main/java/io/metersphere/dashboard/controller/DashboardController.java @@ -3,7 +3,9 @@ package io.metersphere.dashboard.controller; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import io.metersphere.api.dto.definition.ApiDefinitionUpdateDTO; +import io.metersphere.bug.dto.response.BugColumnsOptionDTO; import io.metersphere.bug.service.BugCommonService; +import io.metersphere.bug.service.BugService; import io.metersphere.dashboard.dto.LayoutDTO; import io.metersphere.dashboard.request.DashboardFrontPageRequest; import io.metersphere.dashboard.response.OverViewCountDTO; @@ -14,6 +16,7 @@ import io.metersphere.plugin.platform.dto.SelectOption; import io.metersphere.project.service.PermissionCheckService; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.exception.MSException; +import io.metersphere.system.dto.sdk.TemplateCustomFieldDTO; import io.metersphere.system.security.CheckOwner; import io.metersphere.system.utils.PageUtils; import io.metersphere.system.utils.Pager; @@ -36,6 +39,8 @@ public class DashboardController { @Resource private DashboardService dashboardService; @Resource + private BugService bugService; + @Resource private BugCommonService bugCommonService; @Resource private PermissionCheckService permissionCheckService; @@ -185,5 +190,18 @@ public class DashboardController { return PageUtils.setPageInfo(page, dashboardService.getApiUpdatePage(request)); } + @GetMapping("/header/custom-field/{projectId}") + @Operation(summary = "缺陷列表-获取表头自定义字段集合") + @CheckOwner(resourceId = "#projectId", resourceType = "project") + public List getHeaderFields(@PathVariable String projectId) { + return bugService.getHeaderCustomFields(projectId); + } + + @GetMapping("/header/columns-option/{projectId}") + @Operation(summary = "缺陷列表-获取表头状态选项") + @CheckOwner(resourceId = "#projectId", resourceType = "project") + public BugColumnsOptionDTO getHeaderOption(@PathVariable String projectId) { + return bugService.getHeaderOption(projectId); + } } diff --git a/backend/services/dashboard/src/main/java/io/metersphere/dashboard/controller/ToDoController.java b/backend/services/dashboard/src/main/java/io/metersphere/dashboard/controller/ToDoController.java index de4aff349d..7a3d8bb0ee 100644 --- a/backend/services/dashboard/src/main/java/io/metersphere/dashboard/controller/ToDoController.java +++ b/backend/services/dashboard/src/main/java/io/metersphere/dashboard/controller/ToDoController.java @@ -19,7 +19,6 @@ import io.metersphere.plan.service.TestPlanStatisticsService; import io.metersphere.project.service.ProjectApplicationService; import io.metersphere.sdk.util.LogUtils; import io.metersphere.system.security.CheckOwner; -import io.metersphere.system.service.UserPlatformAccountService; import io.metersphere.system.utils.PageUtils; import io.metersphere.system.utils.Pager; import io.metersphere.system.utils.SessionUtils; @@ -57,8 +56,6 @@ public class ToDoController { @Resource private ProjectApplicationService projectApplicationService; @Resource - private UserPlatformAccountService userPlatformAccountService; - @Resource private TestPlanStatisticsService testPlanStatisticsService; @PostMapping("/plan/page")