标签:map app 使用 wrap sele div nbsp ring rip
首先先配置配置文件
@Configuration public class MybatisPlusConfig { @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); } }
2.进行分页查询
@Test public void selectPage() { QueryWrapper<User> wrapper = new QueryWrapper<>(); wrapper.ge("age",26); Page<User> page = new Page<>(1, 2); IPage<User> userIPage = userMapper.selectPage(page, wrapper); System.out.println("总条数"+userIPage.getTotal()); System.out.println("总页数"+userIPage.getPages()); }
@Test public void selectPage() { QueryWrapper<User> wrapper = new QueryWrapper<>(); wrapper.ge("age",26); Page<User> page = new Page<>(1, 2); IPage<Map<String,Object>> userIPage = userMapper.selectMapsPage(page, wrapper); System.out.println("总条数"+userIPage.getTotal()); System.out.println("总页数"+userIPage.getPages()); }
标签:map app 使用 wrap sele div nbsp ring rip
原文地址:https://www.cnblogs.com/qingmuchuanqi48/p/11920691.html