syso_love 2018-09-04 08:30 采纳率: 100%
浏览 3218
已结题

springdatajpa 取出部分字段 的分页查询

Pageable pageable = new PageRequest(pageNo,Integer.parseInt(pageSize))

@Query("select i.id,i.inserttime,i.condtion,i.moduleId,i.functionId from InterfaceRecord i where i.uid = :uid and results is not null order by inserttime desc")
Page all_history(@Param("uid") Integer uid, Pageable pageable);

Pagepage=interfaceRecordRepository.all_history(adminid,pageable);
我查询出比如说第八页每页十条
page.getContent();获取的是空啊
tatal = page.getTotalElements();这个不是空

  • 写回答

1条回答 默认 最新

  • devmiao 2018-09-04 15:53
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料