MyBatis-Plus selectMapsPage
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());