List<Sort.Order> orders=new ArrayList<Sort.Order>();
orders.add( new Sort.Order(Sort.Direction. DESC, "rwzt")); //降序
orders.add( new Sort.Order(Sort.Direction. ASC, "bm")); //升序
Pageable pageable=PageRequest.of(0//页数, 10//获取条数, Sort.by(orders) );
personRepository.findAll(pageable)); //查询
spring Date JPA实现多条件排序
最新推荐文章于 2023-07-11 10:00:00 发布