public ModelAndView showsignupclass(int page){
ModelAndView mv=new ModelAndView("/user/user-showSignupClass.btl");
Member member=memberRepository.findAll().get(0);
int size=5;
//按報名時間倒序
Sort sort = new Sort(Sort.Direction.DESC,"time");
PageRequest pageable=PageRequest.of(page,size,sort);
Page<ClassOrder> pageObject=classOrderRepository.findByMember_MemberID(member.getMemberID(),pageable); //獲取pageObject的內容
List<ClassOrder> classOrders=pageObject.getContent();
//getTotalPages()返回總的頁數
int totalPage=pageObject.getTotalPages();
//getTotalElements()返回總數
long count=pageObject.getTotalElements();
mv.addObject("count", count);
mv.addObject("totalPage",totalPage);
mv.addObject("classOrders",classOrders);
return mv;
}