current_date():当前日期;
current_time():当前时间;
current_timestamp():当前时间戳。
举个例子:
@Query(value = "select g from GoodsOrder g where g.endFetchTime > current_timestamp ",nativeQuery = false)
public List<GoodsOrder> getPastDateOrder(@Param("openId")String openId, @Param("orderType")Integer orderType);
注释:nativeQuery = false代表使用hql