Java Code Examples for com.baomidou.mybatisplus.core.metadata.IPage#getCurrent()
The following examples show how to use
com.baomidou.mybatisplus.core.metadata.IPage#getCurrent() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LogErrorController.java From SpringBlade with Apache License 2.0 | 5 votes |
/** * 查询多条(分页) */ @GetMapping("/list") public R<IPage<LogErrorVo>> list(@ApiIgnore @RequestParam Map<String, Object> logError, Query query) { IPage<LogError> pages = errorLogService.page(Condition.getPage(query.setDescs("create_time")), Condition.getQueryWrapper(logError, LogError.class)); List<LogErrorVo> records = pages.getRecords().stream().map(logApi -> { LogErrorVo vo = BeanUtil.copy(logApi, LogErrorVo.class); vo.setStrId(Func.toStr(logApi.getId())); return vo; }).collect(Collectors.toList()); IPage<LogErrorVo> pageVo = new Page<>(pages.getCurrent(), pages.getSize(), pages.getTotal()); pageVo.setRecords(records); return R.data(pageVo); }
Example 2
Source File: LogUsualController.java From SpringBlade with Apache License 2.0 | 5 votes |
/** * 查询多条(分页) */ @GetMapping("/list") public R<IPage<LogUsualVo>> list(@ApiIgnore @RequestParam Map<String, Object> log, Query query) { IPage<LogUsual> pages = logService.page(Condition.getPage(query), Condition.getQueryWrapper(log, LogUsual.class)); List<LogUsualVo> records = pages.getRecords().stream().map(logApi -> { LogUsualVo vo = BeanUtil.copy(logApi, LogUsualVo.class); vo.setStrId(Func.toStr(logApi.getId())); return vo; }).collect(Collectors.toList()); IPage<LogUsualVo> pageVo = new Page<>(pages.getCurrent(), pages.getSize(), pages.getTotal()); pageVo.setRecords(records); return R.data(pageVo); }
Example 3
Source File: LogApiController.java From SpringBlade with Apache License 2.0 | 5 votes |
/** * 查询多条(分页) */ @GetMapping("/list") public R<IPage<LogApiVo>> list(@ApiIgnore @RequestParam Map<String, Object> log, Query query) { IPage<LogApi> pages = logService.page(Condition.getPage(query.setDescs("create_time")), Condition.getQueryWrapper(log, LogApi.class)); List<LogApiVo> records = pages.getRecords().stream().map(logApi -> { LogApiVo vo = BeanUtil.copy(logApi, LogApiVo.class); vo.setStrId(Func.toStr(logApi.getId())); return vo; }).collect(Collectors.toList()); IPage<LogApiVo> pageVo = new Page<>(pages.getCurrent(), pages.getSize(), pages.getTotal()); pageVo.setRecords(records); return R.data(pageVo); }
Example 4
Source File: SysUserServiceImpl.java From jeecg-cloud with Apache License 2.0 | 5 votes |
@Override public IPage<SysUserSysDepartModel> queryUserByOrgCode(String orgCode, SysUser userParams, IPage page) { List<SysUserSysDepartModel> list = baseMapper.getUserByOrgCode(page, orgCode, userParams); Integer total = baseMapper.getUserByOrgCodeTotal(orgCode, userParams); IPage<SysUserSysDepartModel> result = new Page<>(page.getCurrent(), page.getSize(), total); result.setRecords(list); return result; }
Example 5
Source File: SysUserServiceImpl.java From jeecg-boot-with-activiti with MIT License | 5 votes |
@Override public IPage<SysUserSysDepartModel> queryUserByOrgCode(String orgCode, SysUser userParams, IPage page) { List<SysUserSysDepartModel> list = baseMapper.getUserByOrgCode(page, orgCode, userParams); Integer total = baseMapper.getUserByOrgCodeTotal(orgCode, userParams); IPage<SysUserSysDepartModel> result = new Page<>(page.getCurrent(), page.getSize(), total); result.setRecords(list); return result; }
Example 6
Source File: SysUserServiceImpl.java From teaching with Apache License 2.0 | 5 votes |
@Override public IPage<SysUserSysDepartModel> queryUserByOrgCode(String orgCode, SysUser userParams, IPage page) { List<SysUserSysDepartModel> list = baseMapper.getUserByOrgCode(page, orgCode, userParams); Integer total = baseMapper.getUserByOrgCodeTotal(orgCode, userParams); IPage<SysUserSysDepartModel> result = new Page<>(page.getCurrent(), page.getSize(), total); result.setRecords(list); return result; }
Example 7
Source File: SysUserServiceImpl.java From jeecg-boot with Apache License 2.0 | 5 votes |
@Override public IPage<SysUserSysDepartModel> queryUserByOrgCode(String orgCode, SysUser userParams, IPage page) { List<SysUserSysDepartModel> list = baseMapper.getUserByOrgCode(page, orgCode, userParams); Integer total = baseMapper.getUserByOrgCodeTotal(orgCode, userParams); IPage<SysUserSysDepartModel> result = new Page<>(page.getCurrent(), page.getSize(), total); result.setRecords(list); return result; }
Example 8
Source File: BaseEntityWrapper.java From blade-tool with GNU Lesser General Public License v3.0 | 5 votes |
/** * 分页实体类集合包装 * * @param pages 分页 * @return Page V */ public IPage<V> pageVO(IPage<E> pages) { List<V> records = listVO(pages.getRecords()); IPage<V> pageVo = new Page<>(pages.getCurrent(), pages.getSize(), pages.getTotal()); pageVo.setRecords(records); return pageVo; }
Example 9
Source File: Paging.java From spring-boot-plus with Apache License 2.0 | 4 votes |
public Paging(IPage<T> page) { this.total = page.getTotal(); this.records = page.getRecords(); this.pageIndex = page.getCurrent(); this.pageSize = page.getSize(); }
Example 10
Source File: PageResultWrapper.java From magic-starter with GNU Lesser General Public License v3.0 | 2 votes |
/** * 构造分页对象 * * @param pageData 当前页数据 * @param <T>泛型 * @return 分页对象 */ public static <T> PageResult<T> wrapper(IPage<T> pageData) { return new PageResult<>((int) pageData.getCurrent(), (int) pageData.getSize(), (int) pageData.getPages(), pageData.getTotal(), pageData.getRecords()); }