- springboot-jpa、hibernate查询返回boolean值
List<Boolean> has = getSession().createQuery(
"select COUNT(*) > 0 from OrderEntity e where e.id=:id and e.completionTime is not null", Boolean.class
).setParameter("id", orderId).list();
if (has.get(0))
return new ResponseResult<>().success("已经支付", true);