PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable); } /** * 清理分页的线程变量 */ publicstaticvoidclearPage() { PageHelper.clearPage(); } } 分页方法通过PageHelper.startPage()实现,关于PageHelper,可以参考《12.MyBatis》的分页插件部分。 TableSupport.buildPageRequest 再点进Page...
(name ="pageSize",value ="每页数据量", dataType ="int", paramType ="query", required =false), })publicResponsePageInfo<SysDept>list(@ModelAttribute SysDept sysDept){ startPage(); List<SysDept> list = sysDeptService.selectSysDeptList(sysDept);returntoResponsePageInfo(list); }/** * ...
})publicResponsePageInfo<SysDept>list(@ModelAttributeSysDeptsysDept){startPage();List<SysDept>list=sysDeptService.selectSysDeptList(sysDept);returntoResponsePageInfo(list); }/*** 导出部门列表*/@PreAuthorize("@ss.hasPermi('system:dept:export')")@Log(title="部门",businessType=BusinessTypeEnum....
{ startPage(); List<SysPost> list = postService.selectPostList(post); returngetDataTable(list); } @PreAuthorize是SpringSecurity中的注解。 startPage startPage(),这个处理分页。 我们点击startPage(),会发现最后调用了PageUtils的startPage()方法。 示例代码: java 1 2 3 4 5 6 7 8 9 10 11 12 13...
{ startPage(); List<SysDept> list = sysDeptService.selectSysDeptList(sysDept); return toResponsePageInfo(list); } /** * 导出部门列表 */ @PreAuthorize("@ss.hasPermi('system:dept:export')") @Log(title = "部门", businessType = BusinessTypeEnum.EXPORT) @GetMapping("/export") @Api...