|
@@ -224,7 +224,7 @@ public class PaperServiceImpl implements PaperService {
|
|
|
query.addCriteria(Criteria.where("lastModifyName").regex(".*?\\.*" + lastModifyName + ".*"));
|
|
|
}
|
|
|
long count = this.mongoTemplate.count(query, Paper.class);
|
|
|
- query.with(new Sort(new Order(Direction.DESC, "createTime")));
|
|
|
+ query.with(Sort.by(new Order(Direction.DESC, "createTime")));
|
|
|
query.limit(pageSize);
|
|
|
query.skip((curPage - 1L) * pageSize);
|
|
|
List<Paper> paperList = this.mongoTemplate.find(query, Paper.class);
|
|
@@ -380,7 +380,7 @@ public class PaperServiceImpl implements PaperService {
|
|
|
query.addCriteria(Criteria.where("lastModifyName").regex(".*?\\.*" + lastModifyName + ".*"));
|
|
|
}
|
|
|
long count = this.mongoTemplate.count(query, Paper.class);
|
|
|
- query.with(new Sort(new Order(Direction.DESC, "createTime")));
|
|
|
+ query.with(Sort.by(new Order(Direction.DESC, "createTime")));
|
|
|
query.limit(pageSize);
|
|
|
query.skip((curPage - 1L) * pageSize);
|
|
|
List<Paper> paperList = this.mongoTemplate.find(query, Paper.class);
|
|
@@ -414,7 +414,7 @@ public class PaperServiceImpl implements PaperService {
|
|
|
query.addCriteria(Criteria.where("lastModifyName").regex(".*?\\.*" + lastModifyName + ".*"));
|
|
|
}
|
|
|
long count = this.mongoTemplate.count(query, Paper.class);
|
|
|
- query.with(new Sort(new Order(Direction.DESC, "createTime")));
|
|
|
+ query.with(Sort.by(new Order(Direction.DESC, "createTime")));
|
|
|
query.limit(pageSize);
|
|
|
query.skip((curPage - 1L) * pageSize);
|
|
|
List<Paper> paperList = this.mongoTemplate.find(query, Paper.class);
|
|
@@ -1140,7 +1140,7 @@ public class PaperServiceImpl implements PaperService {
|
|
|
query.addCriteria(Criteria.where("course.code").is(paperSearchInfo.getCourseNo()));
|
|
|
query.addCriteria(Criteria.where("id").nin(selectedIds));
|
|
|
long total = this.mongoTemplate.count(query, Paper.class);
|
|
|
- query.with(new Sort(new Order(Direction.DESC, "createTime")));
|
|
|
+ query.with(Sort.by(new Order(Direction.DESC, "createTime")));
|
|
|
query.limit(pageSize);
|
|
|
query.skip((curPage - 1L) * pageSize);
|
|
|
List<Paper> paperList = this.mongoTemplate.find(query, Paper.class);
|