MyBatis分页问题

PageMethod.startPage(pageNum,PageSize);

List<A> AList = AMapper.selectByExample(exampleA);

List<B> BList = BMapper.selectByExample(exampleB);

new PageInfo<>(AList);
new PageInfo<>(BList);

分页只对AList生效  BList分页失败

原因是PageMethod.startPage(pageNum,PageSize)只对最近一个sql查询有效

解决办法 写多个 PageMethod.startPage(pageNum,PageSize);