记得上下班打卡 | git大法好,push需谨慎

Commit d70d84d0 authored by zhengfuxin's avatar zhengfuxin

修改排序

parent 5b6ddf24
......@@ -565,8 +565,18 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
}else if(type.equals("2")){
pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.DESC, "shelvesAt"));
}else if(type.equals("3")){
Document source = new Document();
source.put("locale", "zh");
source.put("numericOrdering", true);
Collation collation = Collation.from(source);
query.collation(collation);
pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.DESC, "priceGe"));
}else if(type.equals("4")){
Document source = new Document();
source.put("locale", "zh");
source.put("numericOrdering", true);
Collation collation = Collation.from(source);
query.collation(collation);
pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.ASC, "priceGe"));
}
// 排序 分页
......@@ -623,8 +633,18 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
}else if(type.equals("2")){
pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.DESC, "shelvesAt"));
}else if(type.equals("3")){
Document source = new Document();
source.put("locale", "zh");
source.put("numericOrdering", true);
Collation collation = Collation.from(source);
query.collation(collation);
pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.DESC, "priceGe"));
}else if(type.equals("4")){
Document source = new Document();
source.put("locale", "zh");
source.put("numericOrdering", true);
Collation collation = Collation.from(source);
query.collation(collation);
pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.ASC, "priceGe"));
}
// 排序 分页
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment