Jpa @Query in 占位符写法

    @Query(value = "SELECT  " +
            "  *  " +
            "FROM " +
            "  interface_manager_third manager  " +
            "WHERE EXISTS  " +
            "  (SELECT  " +
            "    *  " +
            "  FROM " +
            "    table_stru_third stru  " +
            "  WHERE stru.`table_stru_third_id` = manager.`interface_config_third_id`  " +
            "    AND stru.`table_name` IN (:tableName)) ORDER BY id DESC", nativeQuery=true)
    List<InterfaceManagerThird> getInterfaceManagerThirdByTableName(@Param("tableName")List<String> tableNames);

猜你喜欢

转载自www.cnblogs.com/liqingwang/p/10125991.html