mirror of
https://gitee.com/devlive-community/datacap.git
synced 2024-11-29 18:48:23 +08:00
[Core] [DataSet] Modify history sorting rules
This commit is contained in:
parent
73a6adf323
commit
ad5e245588
@ -9,5 +9,5 @@ import org.springframework.data.repository.PagingAndSortingRepository;
|
||||
public interface DatasetHistoryRepository
|
||||
extends PagingAndSortingRepository<DatasetHistoryEntity, Long>
|
||||
{
|
||||
Page<DatasetHistoryEntity> findAllByDataset(DataSetEntity dataSet, Pageable pageable);
|
||||
Page<DatasetHistoryEntity> findAllByDatasetOrderByCreateTimeDesc(DataSetEntity dataSet, Pageable pageable);
|
||||
}
|
||||
|
@ -262,7 +262,7 @@ public class DataSetServiceImpl
|
||||
return repository.findByCode(code)
|
||||
.map(item -> {
|
||||
Pageable pageable = PageRequestAdapter.of(filter);
|
||||
return CommonResponse.success(PageEntity.build(historyRepository.findAllByDataset(item, pageable)));
|
||||
return CommonResponse.success(PageEntity.build(historyRepository.findAllByDatasetOrderByCreateTimeDesc(item, pageable)));
|
||||
})
|
||||
.orElseGet(() -> CommonResponse.failure(String.format("DataSet [ %s ] not found", code)));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user