MyBatis-Plus selectMapsPage

作者: adm 分类: mybatis 发布时间: 2021-08-02

MyBatis-Plus selectMapsPage使用方法

MyBatis-Plus selectMapsPageIPage<Map<String, Object>> pageArt = new Page<>(p, 2);
QueryWrapper<CustomsOrderEntity> wrapper = new QueryWrapper();
wrapper.eq("isSend", 0);
wrapper.orderByDesc("id");
String keywords = request.getParameter("keywords");
if (keywords != null) {
    wrapper.like("copMsgId", keywords);
}
IPage<Map<String,Object>>  pager = customsOrderMapper.selectMapsPage(pageArt, wrapper);


List<Map<String,Object>> expressList = pager.getRecords();
System.out.println("总页数:"+pager.getPages());
System.out.println("总记录数:"+pager.getTotal());

如果觉得我的文章对您有用,请随意赞赏。您的支持将鼓励我继续创作!