? 传参
@Query(value = "SELECT * FROM tuxinggeo AS sti WHERE type = ?1 AND index = ?2", nativeQuery = true) List<TuxingGeo> getLayerByTypeAndIndex(int type, int index);
: 传参
@Query(value = "SELECT * FROM tuxinggeo AS sti WHERE type = :sti_type AND index = :sti_index AND town in (:townlist) ", nativeQuery = true) List<TuxingGeo> getLayerByTypeAndIndex2(@Param("sti_type") int sti_type,@Param("sti_index") int sti_index,@Param("townlist") String[] townlist);
标签:传参,index,JPA,sti,int,Query,type From: https://www.cnblogs.com/Fooo/p/17609543.html