Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Class Vote { String name; Date startDate; Date endDate; }
当结束日期优于新日期时,我想显示所有投票
Grails 文档向您显示条件中的运算符列表。在您的情况下,您可以使用gt并传递当前日期。
gt
def votes = Vote.createCriteria().list() { gt('endDate', new Date()) }