groovy.lang.MissingMethodException: No signature of method: com.zy.wms.board.BoardController$_getEnabledDepot_closure7.eq() is applicable for argument types: (java.lang.String, java.lang.Integer) values: [status, 1]
Possible solutions: run(), grep(), any(), is(java.lang.Object), wait(), call()
at com.zy.wms.board.BoardController$_getEnabledDepot_closure7$$EQJrXfze.doCall(BoardController.groovy:131)
at com.zy.wms.board.BoardController$$EQJrXfzc.getEnabledDepot(BoardController.groovy:130)
at com.zy.wms.board.BoardController$$EQJrXfzc.list(BoardController.groovy:14)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
2017-05-17 14:52:09,691 [INFO] (SLF4JLog.java:152)
Reconfiguring access control for BoardController
def c=Depot.createCriteria()
c.find{
eq("status",1)
not({
eq("depot_sn","SA1")
})
}
改成
Depot.findAllByStatusAndDepotSnNotInList(1,["SA1"]);
就可以了