feat(audit): 补齐摄取管道入口并沉淀完成度审计
This commit is contained in:
@@ -4,11 +4,19 @@ import com.bruce.common.domain.model.RequestResult;
|
||||
import com.bruce.workflow.service.IWorkflowWorkspaceService;
|
||||
import com.bruce.workflow.vo.WorkflowWorkspaceVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* Workflow 工作台聚合接口。
|
||||
* <p>
|
||||
* 该接口面向前端原型页面,负责把项目、流程、版本与最近运行记录收口成单一视图,
|
||||
* 避免页面自行拼接多个底层管理接口。
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/workflow-workspace")
|
||||
@RequiredArgsConstructor
|
||||
@@ -19,6 +27,14 @@ public class WorkflowWorkspaceController {
|
||||
@GetMapping("/detail")
|
||||
public RequestResult<WorkflowWorkspaceVO> detail(@RequestParam("projectId") Long projectId,
|
||||
@RequestParam(value = "workflowId", required = false) Long workflowId) {
|
||||
return RequestResult.success(workflowWorkspaceService.getWorkspace(projectId, workflowId));
|
||||
log.info("Workflow工作台查询开始,projectId={}, workflowId={}", projectId, workflowId);
|
||||
WorkflowWorkspaceVO workspace = workflowWorkspaceService.getWorkspace(projectId, workflowId);
|
||||
log.info("Workflow工作台查询结束,projectId={}, workflowId={}, workflowCount={}, versionCount={}, recentRunCount={}",
|
||||
projectId,
|
||||
workflowId,
|
||||
workspace.getWorkflows() == null ? 0 : workspace.getWorkflows().size(),
|
||||
workspace.getVersions() == null ? 0 : workspace.getVersions().size(),
|
||||
workspace.getRecentRuns() == null ? 0 : workspace.getRecentRuns().size());
|
||||
return RequestResult.success(workspace);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user