我想显示未完成的投票并且当前用户未参与这些投票。
我从以下标准开始:
def displayAdherantByVote(){
def adherant=springSecurityService.currentUser.username
def elec=Election.withCriteria(){
createAlias("adherant", "adherant")
createAlias("candidature", "candidature")
eq('adherant.firstName',adherant)
projections{
property('candidature.vote')
}
def newvote(){
def votes= Vote.createCriteria()
def results=votes.list{
ge("enddateelection",new Date())
le("startdateelection",new Date())
}