/**
* @description: 分页查询
* <!-- mybatis分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
</dependency>
* @Author: 码上得天下
* @create: 2019-12-26 10:57
**/
@RestController
public class Test {
@Autowired
TestMapper testMapper;
@RequestMapping("/test")
public List<String > selectUrl(@RequestBody Map map){
// 当前页在第几页(从1开始,如果输入0则查询的是所有记录)
int pageNum = (int) map.get("pageNum");
// 当前页的数量
int pageSize = (int) map.get("pageSize");
PageHelper.startPage(pageNum,pageSize);
List<String > list = testMapper.selectUrl();
return list ;
}
}