我有存储库方法:
@Query(value = "select t from Transaction t " +
"where t.bankAccountId in (:bankAccountIds) " +
"and t.tradeTime is not null " +
"and t.ccy is not null " +
"and t.net is not null " +
"and t.tradeTime >= :startDate and t.tradeTime <= :endDate " +
"and t.status = :status")
List<Transaction> findAllByBankAccountIdInAndTradeTimeBetween(@Param("bankAccountIds") Iterable<UUID> bankAccountIds,
@Param("status") TransactionStatus status,
@Param("startDate") LocalDateTime startDate,
@Param("endDate") LocalDateTime endDate);
但当我尝试使用这段代码时,我有一个例外:
导致原因:org.postgresql.util.psqlexception:error:语法错误位于或接近“)”
如何修复?
1条答案
按热度按时间i7uaboj41#
我想你不需要括号(:bankAccountId)