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

Commit 447ae015 authored by 周焕's avatar 周焕

Merge branch 'pre' into 'master'

ÅPre

See merge request !198
parents 87d1aeb0 e1000a58
...@@ -631,23 +631,23 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -631,23 +631,23 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
Pageable pageable=null; Pageable pageable=null;
// //
if(type.equals("1")){ if(type.equals("1")){
pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.DESC, "count")); pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.DESC, "count","createdAt"));
}else if(type.equals("2")){ }else if(type.equals("2")){
pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.DESC, "shelvesAt")); pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.DESC, "shelvesAt","createdAt"));
}else if(type.equals("3")){ }else if(type.equals("3")){
Document source = new Document(); Document source = new Document();
source.put("locale", "zh"); source.put("locale", "zh");
source.put("numericOrdering", true); source.put("numericOrdering", true);
Collation collation = Collation.from(source); Collation collation = Collation.from(source);
query.collation(collation); query.collation(collation);
pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.DESC, "priceGe")); pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.DESC, "priceGe","createdAt"));
}else if(type.equals("4")){ }else if(type.equals("4")){
Document source = new Document(); Document source = new Document();
source.put("locale", "zh"); source.put("locale", "zh");
source.put("numericOrdering", true); source.put("numericOrdering", true);
Collation collation = Collation.from(source); Collation collation = Collation.from(source);
query.collation(collation); query.collation(collation);
pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.ASC, "priceGe")); pageable = PageRequest.of(page, pageSize, Sort.by(Sort.Direction.ASC, "priceGe","createdAt"));
} }
// 排序 分页 // 排序 分页
// Query query = Query.query(Criteria.where("status").ne(1).and("status").ne(0)); // Query query = Query.query(Criteria.where("status").ne(1).and("status").ne(0));
......
...@@ -40,7 +40,8 @@ public class PlatformGoblinGoodsTaskController { ...@@ -40,7 +40,8 @@ public class PlatformGoblinGoodsTaskController {
queryWrapper.eq(GoblinGoods::getSpuAppear, "0"); queryWrapper.eq(GoblinGoods::getSpuAppear, "0");
queryWrapper.eq(GoblinGoods::getShelvesHandle, "3"); queryWrapper.eq(GoblinGoods::getShelvesHandle, "3");
queryWrapper.le(GoblinGoods::getShelvesTime, now); queryWrapper.le(GoblinGoods::getShelvesTime, now);
queryWrapper.eq(GoblinGoods::getShelvesStatus, "0"); // queryWrapper.eq(GoblinGoods::getShelvesStatus, "0");
queryWrapper.in(GoblinGoods::getShelvesStatus, "0", "1");
queryWrapper.orderByAsc(GoblinGoods::getShelvesTime); queryWrapper.orderByAsc(GoblinGoods::getShelvesTime);
queryWrapper.select(GoblinGoods::getSpuId); queryWrapper.select(GoblinGoods::getSpuId);
......
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