Java Code Examples for com.baomidou.mybatisplus.plugins.Page#getRecords()
The following examples show how to use
com.baomidou.mybatisplus.plugins.Page#getRecords() .
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: CinemaController.java From MeetingFilm with Apache License 2.0 | 6 votes |
@RequestMapping(value = "getCinemas") public ResponseVO getCinemas(CinemaQueryVO cinemaQueryVO) { try { // 按照五个条件进行筛选 Page<CinemaVO> cinemas = cinemaServiceAPI.getCinemas(cinemaQueryVO); // 判断是否有满足条件的影院 if (cinemas.getRecords() == null || cinemas.getRecords().size() == 0) { return ResponseVO.success("没有影院可查"); } else { return ResponseVO.success(cinemas.getCurrent(), (int) cinemas.getPages(), "", cinemas.getRecords()); } } catch (Exception e) { // 如果出现异常,应该如何处理 log.error("获取影院列表异常", e); return ResponseVO.serviceFail("查询影院列表失败"); } }
Example 2
Source File: SysRoleServiceImpl.java From watchdog-framework with MIT License | 5 votes |
@Override public Page<SysRole> list(FindRoleDTO findRoleDTO) { EntityWrapper<SysRole> wrapper = new EntityWrapper<>(); wrapper.orderBy("id",findRoleDTO.getAsc()); Page<SysRole> rolePage = this.selectPage(new Page<>(findRoleDTO.getPage(), findRoleDTO.getPageSize()), wrapper); if(findRoleDTO.getHasResource()){ if(rolePage.getRecords()!=null){ rolePage.getRecords().forEach(v-> v.setResources(roleResourceService.findAllResourceByRoleId(v.getId()))); } } return rolePage; }
Example 3
Source File: BlogArticleServiceImpl.java From mysiteforme with Apache License 2.0 | 5 votes |
@Cacheable(value = "myarticle",key="'directive_limit_'+#paramMap['limit'].toString()+'_channelId_'+#paramMap['channelId'].toString()",unless = "#result == null or #result.size() == 0") @Override public List<BlogArticle> selectArticleData(Map<String, Object> paramMap) { Long channelId = (Long)paramMap.get("channelId"); Integer limit = (Integer)paramMap.get("limit"); EntityWrapper<BlogArticle> wrapper = new EntityWrapper<>(); wrapper.eq("del_flag",false); wrapper.eq("channel_id",channelId); wrapper.orderBy("is_top",false).orderBy("is_recommend",false) .orderBy("sort",false).orderBy("publist_time",false); Page<BlogArticle> pageData = selectPage(new Page<BlogArticle>(1,limit),wrapper); return pageData.getRecords(); }
Example 4
Source File: UserServiceDTOConvert.java From paas with Apache License 2.0 | 5 votes |
public Page<UserServiceDTO> convert(Page<UserService> page) { List<UserService> userServices = page.getRecords(); List<UserServiceDTO> userServiceDTOS = convert(userServices); Page<UserServiceDTO> page1 = new Page<>(); BeanUtils.copyProperties(page, page1); page1.setRecords(userServiceDTOS); return page1; }
Example 5
Source File: UserContainerDTOConvert.java From paas with Apache License 2.0 | 5 votes |
public Page<UserContainerDTO> convert(Page<UserContainer> page) { List<UserContainer> containers = page.getRecords(); List<UserContainerDTO> containerDTOS = convert(containers); Page<UserContainerDTO> page1 = new Page<>(); BeanUtils.copyProperties(page, page1); page1.setRecords(containerDTOS); return page1; }
Example 6
Source File: MiSysLogController.java From MI-S with MIT License | 5 votes |
/** selectlist **/ @RequestMapping(value = "selectPage") public List<MiSysLog> selectPage(){ Page page = iMiSysLogService.selectPage(new Page<MiSysLog>()); List<MiSysLog> list = page.getRecords(); return list; }
Example 7
Source File: PageInfoBT.java From MeetingFilm with Apache License 2.0 | 4 votes |
public PageInfoBT(Page<T> page) { this.rows = page.getRecords(); this.total = page.getTotal(); }
Example 8
Source File: PageInfoBT.java From WebStack-Guns with MIT License | 4 votes |
public PageInfoBT(Page<T> page) { this.rows = page.getRecords(); this.total = page.getTotal(); }