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")