jpa @Query中使用in

jpa @Query中使用in,需要注意参数一定要是List<>,不然无法查询出数据。

@Query(value = "select count(*) from financial_style_productitem_detailed fspd where fspd.id in(:ids)", nativeQuery = true)
  Integer findByStyleIds(@Param(value = "ids") List<String> ids);

posted @ 2021-12-27 16:07  Ash灬  阅读(1377)  评论(0)    收藏  举报