1
This commit is contained in:
parent
3374885ce2
commit
9ddb1dc6cf
@ -25,6 +25,6 @@ public interface IWorkflowInstanceRepository extends IBaseRepository<WorkflowIns
|
|||||||
|
|
||||||
List<WorkflowInstance> findTop1ByWorkflowDefinitionIdOrderByCreateTimeDesc(Long workflowDefinitionId);
|
List<WorkflowInstance> findTop1ByWorkflowDefinitionIdOrderByCreateTimeDesc(Long workflowDefinitionId);
|
||||||
|
|
||||||
Page<WorkflowInstance> findByWorkflowDefinitionId(Long workflowDefinitionId, Pageable pageable);
|
Page<WorkflowInstance> findByWorkflowDefinitionIdOrderByCreateTimeDesc(Long workflowDefinitionId, Pageable pageable);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -212,7 +212,7 @@ public class WorkflowInstanceServiceImpl extends BaseServiceImpl<WorkflowInstanc
|
|||||||
@Override
|
@Override
|
||||||
public Page<WorkflowHistoricalInstancesDTO> historicalInstances(WorkflowHistoricalInstancesQuery query) {
|
public Page<WorkflowHistoricalInstancesDTO> historicalInstances(WorkflowHistoricalInstancesQuery query) {
|
||||||
Pageable pageable = PageRequest.of(query.getPageNum(), query.getPageSize());
|
Pageable pageable = PageRequest.of(query.getPageNum(), query.getPageSize());
|
||||||
Page<WorkflowInstance> workflowInstances = workflowInstanceRepository.findByWorkflowDefinitionId(query.getWorkflowDefinitionId(), pageable);
|
Page<WorkflowInstance> workflowInstances = workflowInstanceRepository.findByWorkflowDefinitionIdOrderByCreateTimeDesc(query.getWorkflowDefinitionId(), pageable);
|
||||||
List<WorkflowHistoricalInstancesDTO> result = new ArrayList<>();
|
List<WorkflowHistoricalInstancesDTO> result = new ArrayList<>();
|
||||||
workflowInstances.getContent().stream().map(workflowInstance -> {
|
workflowInstances.getContent().stream().map(workflowInstance -> {
|
||||||
WorkflowHistoricalInstancesDTO workflowHistoricalInstancesDTO = workflowInstanceConverter.toWorkflowHistoricalInstancesDTO(workflowInstance);
|
WorkflowHistoricalInstancesDTO workflowHistoricalInstancesDTO = workflowInstanceConverter.toWorkflowHistoricalInstancesDTO(workflowInstance);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user