Commit 1b914cc2 authored by Menethil's avatar Menethil
Browse files

修改首页排序为按时间降序

parent 8adb227a
......@@ -21,6 +21,7 @@ public class LitemallGoodsService {
public List<LitemallGoods> queryByHot(int offset, int limit) {
LitemallGoodsExample example = new LitemallGoodsExample();
example.or().andIsHotEqualTo(true).andDeletedEqualTo(false);
example.setOrderByClause("add_time desc");
PageHelper.startPage(offset, limit);
return goodsMapper.selectByExample(example);
}
......@@ -28,6 +29,7 @@ public class LitemallGoodsService {
public List<LitemallGoods> queryByNew(int offset, int limit) {
LitemallGoodsExample example = new LitemallGoodsExample();
example.or().andIsNewEqualTo(true).andDeletedEqualTo(false);
example.setOrderByClause("add_time desc");
PageHelper.startPage(offset, limit);
return goodsMapper.selectByExample(example);
}
......@@ -35,6 +37,7 @@ public class LitemallGoodsService {
public List<LitemallGoods> queryByCategory(List<Integer> catList, int offset, int limit) {
LitemallGoodsExample example = new LitemallGoodsExample();
example.or().andCategoryIdIn(catList).andDeletedEqualTo(false);
example.setOrderByClause("add_time desc");
PageHelper.startPage(offset, limit);
return goodsMapper.selectByExample(example);
}
......@@ -48,6 +51,7 @@ public class LitemallGoodsService {
public List<LitemallGoods> queryByCategory(Integer catId, int offset, int limit) {
LitemallGoodsExample example = new LitemallGoodsExample();
example.or().andCategoryIdEqualTo(catId).andDeletedEqualTo(false);
example.setOrderByClause("add_time desc");
PageHelper.startPage(offset, limit);
return goodsMapper.selectByExample(example);
}
......
Supports Markdown
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