热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

com.baomidou.mybatisplus.plugins.Page.setRecords()方法的使用及代码示例

本文整理了Java中com.baomidou.mybatisplus.plugins.Page.setRecords()方法的一些代码示例,展示了Page.

本文整理了Java中com.baomidou.mybatisplus.plugins.Page.setRecords()方法的一些代码示例,展示了Page.setRecords()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Page.setRecords()方法的具体详情如下:
包路径:com.baomidou.mybatisplus.plugins.Page
类名称:Page
方法名:setRecords

Page.setRecords介绍

暂无

代码示例

代码示例来源:origin: stylefeng/Guns

/**
* 查询操作日志列表
*
* @author fengshuonan
* @Date 2018/12/23 5:34 PM
*/
@RequestMapping("/list")
@Permission(Const.ADMIN_NAME)
@ResponseBody
public Object list(@RequestParam(required = false) String beginTime,
@RequestParam(required = false) String endTime,
@RequestParam(required = false) String logName,
@RequestParam(required = false) Integer logType) {
//获取分页参数
Page page = new PageFactory().defaultPage();
//根据条件查询操作日志
List> result = operationLogService.getOperationLogs(page, beginTime, endTime, logName,
BizLogType.valueOf(logType), page.getOrderByField(), page.isAsc());
page.setRecords(new LogWarpper(result).wrap());
return new PageInfoBT<>(page);
}

代码示例来源:origin: stylefeng/Guns

/**
* 查询登录日志列表
*
* @author fengshuonan
* @Date 2018/12/23 5:51 PM
*/
@RequestMapping("/list")
@Permission(Const.ADMIN_NAME)
@ResponseBody
public Object list(@RequestParam(required = false) String beginTime,
@RequestParam(required = false) String endTime,
@RequestParam(required = false) String logName) {
//获取分页参数
Page page = new PageFactory().defaultPage();
//根据条件查询日志
List> result = loginLogService.getLoginLogs(page, beginTime, endTime, logName, page.getOrderByField(), page.isAsc());
page.setRecords(new LogWarpper(result).wrap());
return new PageInfoBT<>(page);
}

代码示例来源:origin: MIYAOW/MI-S

@Override
public Page

selectArticlePage(Page page, Map param) {
List
list = articleMapper.selectArticlePage(page, param);
page.setRecords(list);
return page;
}

代码示例来源:origin: qq53182347/liugh-parent

@Override
public Page selectPageByConditionUser(Page userPage, String info, Integer[] status, String startTime, String endTime) {
//注意!! 分页 total 是经过插件自动 回写 到传入 page 对象
return userPage.setRecords(mapper.selectPageByConditionUser(userPage, info,status,startTime,endTime));
}

代码示例来源:origin: MIYAOW/MI-S

@Override
public Page selectArticleList(Page page) {
List list = articleMapper.selectArticleList(page);
page.setRecords(list);
return page;
}

代码示例来源:origin: MIYAOW/MI-S

@Override
public Page selectArticleByType(Page page, String typeId) {
List list = articleMapper.selectArticleByType2(page, typeId);
page.setRecords(list);
return page;
}

代码示例来源:origin: MIYAOW/MI-S

@Override
public Page selectArticleByArchive(Page page) {
List list = articleMapper.selectArticleList(page);
page.setRecords(list);
return page;
}

代码示例来源:origin: MIYAOW/MI-S

@Override
public Page selectArticleByTag(Page page, String tagId) {
List list = articleMapper.selectArticleByTag(page, tagId);
page.setRecords(list);
return page;
}

代码示例来源:origin: leecho/cola-cloud

@Override
public Page> selectMapsPage(Page page, Wrapper wrapper) {
wrapper = (Wrapper) SqlHelper.fillWrapper(page, wrapper);
page.setRecords(mapper.selectMapsPage(page, wrapper));
return page;
}

代码示例来源:origin: leecho/cola-cloud

@Override
public Page selectPage(Page page, Wrapper wrapper) {
wrapper = (Wrapper) SqlHelper.fillWrapper(page, wrapper);
page.setRecords(mapper.selectPage(page, wrapper));
return page;
}

代码示例来源:origin: com.y3tu/y3tu-tool-web

/**
* 列表
*
* @param params 参数集
* @return 数据库表
*/
@GetMapping("/page" )
public Page list(@RequestParam Map params) {
Query query = new Query(params);
query.getPage().setRecords(sysGeneratorService.queryTableName());
return query.getPage();
}

代码示例来源:origin: youngMen1/JAVA-

public Page query(Map params) {
Page page = getPage(params);
page.setRecords(mapper.selectIdPage(page, params));
return getPage(page);
}

代码示例来源:origin: leecho/cola-cloud

@SuppressWarnings({"unchecked", "rawtypes"})
public Page> selectPage(Page page, String sql, Object... args) {
if (null == page) {
return null;
}
page.setRecords(sqlSession().selectList(SELECT_LIST, sqlMap(sql, args), page));
return page;
}

代码示例来源:origin: aillamsun/devX

@GetMapping("/pagehelper")
public Object pagehelper(Page page) {
PageHelper.setPagination(page);
page.setRecords(userService.selectList(null));
page.setTotal(PageHelper.freeTotal());//获取总数并释放资源 也可以 PageHelper.getTotal()
return page;
}

代码示例来源:origin: youngMen1/JAVA-

protected

Page

query(Map params, Class

cls) {
Page page = getPage(params);
page.setRecords(mapper.selectIdPage(page, params));
return getPage(page, cls);
}

代码示例来源:origin: qiurunze123/GEEKQ-CM

/**
* 查询登录日志列表
*/
@RequestMapping("/list")
@Permission(Const.ADMIN_NAME)
@ResponseBody
public Object list(@RequestParam(required = false) String beginTime, @RequestParam(required = false) String endTime, @RequestParam(required = false) String logName) {
Page page = new PageFactory().defaultPage();
List> result = loginLogService.getLoginLogs(page, beginTime, endTime, logName, page.getOrderByField(), page.isAsc());
page.setRecords((List) new LogWarpper(result).warp());
return super.packForBT(page);
}

代码示例来源:origin: qiurunze123/GEEKQ-CM

/**
* 查询操作日志列表
*/
@RequestMapping("/list")
@Permission(Const.ADMIN_NAME)
@ResponseBody
public Object list(@RequestParam(required = false) String beginTime, @RequestParam(required = false) String endTime, @RequestParam(required = false) String logName, @RequestParam(required = false) Integer logType) {
Page page = new PageFactory().defaultPage();
List> result = operationLogService.getOperationLogs(page, beginTime, endTime, logName, BizLogType.valueOf(logType), page.getOrderByField(), page.isAsc());
page.setRecords((List) new LogWarpper(result).warp());
return super.packForBT(page);
}

代码示例来源:origin: youngMen1/JAVA-

public Page queryLog(Map params) {
Page ids = BaseService.getPage(params);
ids.setRecords(logMapper.selectIdByMap(ids, params));
Page page = new Page(ids.getCurrent(), ids.getSize());
page.setTotal(ids.getTotal());
if (ids != null) {
List records = InstanceUtil.newArrayList();
for (Long id : ids.getRecords()) {
records.add(applicationContext.getBean(getClass()).getFireLogById(id));
}
page.setRecords(records);
}
return page;
}
}

代码示例来源:origin: leecho/cola-cloud

@Override
public Page> getTenantList(Page page, String code, String name){
SysTenantMapper mapper = this.getMapper(SysTenantMapper.class);
name = StringUtils.concatLikeAll(name);
code = StringUtils.concatLikeAll(code);
List list = mapper.findTenantList(page, code, name);
page.setRecords(list);
return page;
}

代码示例来源:origin: leecho/cola-cloud

@Override
public Page getEmployeeListByOrgId(Page page, String name, String username, Integer status) {
SysEmployeeMapper mapper = this.getMapper(SysEmployeeMapper.class);
name = StringUtils.concatLikeAll(name);
username = StringUtils.concatLikeAll(username);
List list = mapper.getEmployeeListByOrgId(page, name, username, status);
page.setRecords(list);
return page;
}

推荐阅读
author-avatar
COMEX黄金2502897957
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有