service
IPage<Goods> page = goodsMapper.findGoodsPriceReduction(new Page<>(pages.getCurrent(), pages.getSize()),2);
mapper
@Select("SELECT * from goods where statu = #{statu} and original_price is not NULL and (original_price <= price) ")
IPage<Goods> findGoodsPriceReduction(Page<Goods> goodsPage, @Param("statu") Integer statu);
遇到问题
1:
NoSuchMethodException: com.baomidou.mybatisplus.core.metadata.IPage.<init>()
解决
mybatis-plus 版本太低,我是3.0.5,建议升级版本,我升级到3.2.0
2:
UnsupportedOperationException: null
原因