商品列表排序从时间换为sort

This commit is contained in:
wuchunlei
2024-01-02 16:55:06 +08:00
parent eccc736079
commit 40f2f46da0

View File

@@ -34,7 +34,7 @@ public class ShopProductServiceImpl extends ServiceImpl<ShopProductDao, ShopProd
public PageUtils appQueryPage(Map<String, Object> params) { public PageUtils appQueryPage(Map<String, Object> params) {
IPage<ShopProduct> page = this.page( IPage<ShopProduct> page = this.page(
new Query<ShopProduct>().getPage(params), new Query<ShopProduct>().getPage(params),
new QueryWrapper<ShopProduct>().orderByDesc("create_time") new QueryWrapper<ShopProduct>().orderByAsc("sort")
.like("product_name", params.get("key")) .like("product_name", params.get("key"))
); );
return new PageUtils(page); return new PageUtils(page);