Ver código fonte

replace to Sort.by

deason 4 anos atrás
pai
commit
357d6ef251

+ 1 - 1
examcloud-task-service/src/main/java/cn/com/qmth/examcloud/task/service/impl/ReportsComputeServiceImpl.java

@@ -774,7 +774,7 @@ public class ReportsComputeServiceImpl implements ReportsComputeService {
 			return cb.and(predicates.toArray(new Predicate[predicates.size()]));
 			return cb.and(predicates.toArray(new Predicate[predicates.size()]));
 		};
 		};
 
 
-		PageRequest pageRequest = PageRequest.of(pageNo - 1, pageSize, new Sort(Direction.DESC, "id"));
+		PageRequest pageRequest = PageRequest.of(pageNo - 1, pageSize, Sort.by(Direction.DESC, "id"));
 
 
 		Page<ReportsComputeEntity> projects = reportsComputeRepo.findAll(specification, pageRequest);
 		Page<ReportsComputeEntity> projects = reportsComputeRepo.findAll(specification, pageRequest);