WANG il y a 6 ans
Parent
commit
e4f810edee

+ 2 - 2
examcloud-core-examwork-api-provider/src/main/java/cn/com/qmth/examcloud/core/examwork/api/provider/ExamCloudServiceProvider.java

@@ -246,7 +246,7 @@ public class ExamCloudServiceProvider extends ControllerSupport implements ExamC
 		Specification<ExamEntity> specification = (root, query, cb) -> {
 			List<Predicate> predicates = new ArrayList<>();
 			predicates.add(cb.equal(root.get("rootOrgId"), rootOrgId));
-			predicates.add(cb.lessThan(root.get("beginTime"), new Date()));
+			// predicates.add(cb.lessThan(root.get("beginTime"), new Date()));
 			predicates.add(cb.greaterThan(root.get("endTime"), new Date()));
 			if (null != type) {
 				predicates.add(cb.equal(root.get("examType"), type));
@@ -261,7 +261,7 @@ public class ExamCloudServiceProvider extends ControllerSupport implements ExamC
 			return cb.and(predicates.toArray(new Predicate[predicates.size()]));
 		};
 
-		PageRequest pageRequest = new PageRequest(0, 100, new Sort(Direction.DESC, "updateTime"));
+		PageRequest pageRequest = new PageRequest(0, 100, new Sort(Direction.ASC, "beginTime"));
 
 		Page<ExamEntity> page = examRepo.findAll(specification, pageRequest);