This commit is contained in:
wangjinlei
2023-10-12 17:59:43 +08:00
parent 4b41546072
commit 0d29114953
2 changed files with 5 additions and 1 deletions

View File

@@ -34,6 +34,10 @@ public class ShopProductEntity implements Serializable {
* 商品价格
*/
private BigDecimal price;
/**
* 是否为最新上市
*/
private Integer isNew;
/**
* 商品活动价格
*/

View File

@@ -49,7 +49,7 @@ public class ShopProductServiceImpl extends ServiceImpl<ShopProductDao, ShopProd
public PageUtils getNewBook(Map<String, Object> params) {
IPage<ShopProductEntity> page = this.page(
new Query<ShopProductEntity>().getPage(params),
new QueryWrapper<ShopProductEntity>().orderByDesc("create_time")
new QueryWrapper<ShopProductEntity>().eq("is_new",1).orderByDesc("create_time")
);
return new PageUtils(page);
}