Spring Data JPA(Java Persistence API)提供了以下方法:
然后按“max_borrow_amt desc”排序,但这是无效的。列表是无序的。
@Query("select pb.id,pp.max_borrow_amt,pp.min_borrow_amt
from product_loan_basic pb left join product_loan_price pp on pb.code=pp.product_code
where pb.code IN(?1) and pb.status='publish' order by ?2 ",
nativeQuery = true)
List<Object[]> findByCodesIn(List<String> codes,String orderby);
然后按“max_borrow_amt desc”排序,但这是无效的。列表是无序的。