Spring Data Jpa 方法是这样的:@Query("select pb.id,pp.max_borrow_amt,pp.min_borrow_amtfrom 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);那么 order by 是“ max_borrow_amt desc ”,但这是无效的。列表是无序的。
添加回答
举报
0/150
提交
取消