SpringDataJpa根据多个id物品清单id查询房源编号
作者:互联网
需求:根据多个物品清单id去重查询房源编号
sql语句:
select DISTINCT f.house_bill_no from financial_style_productitem_detailed f where f.id in (117,119)
/**
* 根据物品id查询房源号
*
* @param houseBillBo
* @return
*/
@Query(value = "select DISTINCT f.houseBillNo from StyleProductItemDetailed f" + " where f.id in (:styleIds)")
String findHouseBillNoByStyleIds(@Param("styleIds") List<Long> styleIds);
标签:SpringDataJpa,DISTINCT,styleIds,查询,清单,房源,id,select 来源: https://blog.51cto.com/u_11710338/2845968