use of com.baomidou.mybatisplus.core.metadata.IPage in project jun_springboot_api_service by wujun728.
the class SysDictDetailController method findListByPage.
@ApiOperation(value = "查询列表数据")
@PostMapping("/listByPage")
@RequiresPermissions("sysDict:list")
public DataResult findListByPage(@RequestBody SysDictDetailEntity sysDictDetail) {
Page page = new Page(sysDictDetail.getPage(), sysDictDetail.getLimit());
if (StringUtils.isEmpty(sysDictDetail.getDictId())) {
return DataResult.success();
}
IPage<SysDictDetailEntity> iPage = sysDictDetailService.listByPage(page, sysDictDetail.getDictId());
return DataResult.success(iPage);
}
use of com.baomidou.mybatisplus.core.metadata.IPage in project jun_springboot_api_service by wujun728.
the class SysFilesController method findListByPage.
@ApiOperation(value = "查询分页数据")
@PostMapping("/listByPage")
@RequiresPermissions("sysFiles:list")
public DataResult findListByPage(@RequestBody SysFilesEntity sysFiles) {
Page page = new Page(sysFiles.getPage(), sysFiles.getLimit());
IPage<SysFilesEntity> iPage = sysFilesService.page(page, Wrappers.<SysFilesEntity>lambdaQuery().orderByDesc(SysFilesEntity::getCreateDate));
return DataResult.success(iPage);
}
use of com.baomidou.mybatisplus.core.metadata.IPage in project jun_springboot_api_service by wujun728.
the class BizTestController method findListByPage.
@ApiOperation(value = "查询分页数据")
@PostMapping("bizTest/listByPage")
@RequiresPermissions("bizTest:list")
@ResponseBody
public DataResult findListByPage(@RequestBody BizTestEntity bizTest) {
Page page = new Page(bizTest.getPage(), bizTest.getLimit());
LambdaQueryWrapper<BizTestEntity> queryWrapper = Wrappers.lambdaQuery();
// 查询条件示例
// queryWrapper.eq(BizTestEntity::getId, bizTest.getId());
IPage<BizTestEntity> iPage = bizTestService.page(page, queryWrapper);
return DataResult.success(iPage);
}
use of com.baomidou.mybatisplus.core.metadata.IPage in project springboot by lbshold.
the class ApplicationTests method contextLoads.
@Test
public void contextLoads() {
// System.out.println(("----- selectAll method test ------"));
// List<User> userList = userMapper.selectList(null);
// Assert.assertEquals(5, userList.size());
// userList.forEach(System.out::println);
IPage<User> userIPage = userMapper.selectPageVo(new Page(1, 5), "J");
userIPage.getRecords().forEach(System.out::println);
}
use of com.baomidou.mybatisplus.core.metadata.IPage in project ballcat by ballcat-projects.
the class PageUtil method prodPage.
/**
* 根据 PageParam 生成一个 IPage 实例
* @param pageParam 分页参数
* @param <V> 返回的 Record 对象
* @return IPage<V>
*/
public static <V> IPage<V> prodPage(PageParam pageParam) {
Page<V> page = new Page<>(pageParam.getCurrent(), pageParam.getSize());
List<PageParam.Sort> sorts = pageParam.getSorts();
for (PageParam.Sort sort : sorts) {
OrderItem orderItem = sort.isAsc() ? OrderItem.asc(sort.getField()) : OrderItem.desc(sort.getField());
page.addOrder(orderItem);
}
return page;
}
Aggregations