增加form表单

This commit is contained in:
dengqichen 2025-10-24 16:12:09 +08:00
parent cb60651c26
commit 4a1fd5516c

View File

@ -202,7 +202,7 @@ public class WorkflowInstanceServiceImpl extends BaseServiceImpl<WorkflowInstanc
@Override @Override
public Page<WorkflowTemplateWithInstancesDTO> findTemplatesWithRecentInstances(WorkflowDefinitionQuery query) { public Page<WorkflowTemplateWithInstancesDTO> findTemplatesWithRecentInstances(WorkflowDefinitionQuery query) {
Pageable pageable = PageRequest.of(query.getPageNum() - 1, query.getPageSize()); Pageable pageable = PageRequest.of(query.getPageNum(), query.getPageSize());
Page<WorkflowDefinition> definitionPage = workflowDefinitionRepository.findByStatus(WorkflowDefinitionStatusEnums.PUBLISHED, pageable); Page<WorkflowDefinition> definitionPage = workflowDefinitionRepository.findByStatus(WorkflowDefinitionStatusEnums.PUBLISHED, pageable);
List<WorkflowTemplateWithInstancesDTO> result = definitionPage.getContent().stream().map(definition -> { List<WorkflowTemplateWithInstancesDTO> result = definitionPage.getContent().stream().map(definition -> {
List<WorkflowInstance> workflowInstances = workflowInstanceRepository.findTop1ByWorkflowDefinitionIdOrderByCreateTimeDesc(definition.getId()); List<WorkflowInstance> workflowInstances = workflowInstanceRepository.findTop1ByWorkflowDefinitionIdOrderByCreateTimeDesc(definition.getId());