注解@Query使用in

@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);
@Query("select new ResultInfo(r.displayName,r.result.id,r.result.createdDate,r.result.createdBy.displayName) from ResultInfo r where r.result.id not in ?1 and r.secUser.id<>?2 and r.createdBy.id<>?3 and r.creator=?4")
    Page<ResultInfo> findToBeSharedResultInfoeListTwo(List<String>beSharedIdList,
                                                      String secUserId,
                                                      String createdById,
                                                      Boolean creator,
                                                      Pageable pageable);
posted @ 2022-01-24 10:11  KeepArlen  阅读(1094)  评论(0)    收藏  举报