Page 1 of 0 containing UNKNOWN instances错误

来源:6-7 买家订单-service查询

qq_大寒_2

2019-12-15

   @Override
    public Page<OrderDto> findList(String buyerOpenid, Pageable pageable) {
       Page<OrderMaster> orderMasterPage= orderMasterRepository.findByBuyerOpenid(buyerOpenid,pageable);

      List<OrderDto> orderDtoList=OrderMaster2OrderDtoCoverter.convert( orderMasterPage.getContent());
       Page<OrderDto> orderDtoPage=new PageImpl<OrderDto>(orderDtoList,pageable,orderMasterPage.getTotalElements());

        return orderDtoPage;
    }

orderMasterPage报错

传参页面
@Test
public void findList() {
PageRequest request=new PageRequest(0,2);
Page orderDtoPage=orderService.findList(“1576393037747”,request);
Assert.assertNotEquals(0,orderDtoPage.getTotalElements());

}
写回答

2回答

城南晨

2020-06-03

老铁,你的报错解决了吗?


0
0

廖师兄

2019-12-16

错误信息给的有点少,你把错误日志复制发出来

0
0

Spring Boot双版本(1.5/2.1) 打造企业级微信点餐系统

从0到1开发中小型企业级Java应用,并学会迭代重构技巧

6410 学习 · 5247 问题

查看课程