您的错误可能在以下行中:
List<Long> result = query.list();
其中query.list()返回BigInteger列表而不是Long列表。尝试将其更改为。
List<BigInteger> result = query.list();

您的错误可能在以下行中:
List<Long> result = query.list();
其中query.list()返回BigInteger列表而不是Long列表。尝试将其更改为。
List<BigInteger> result = query.list();