def sqlStr1="select a.*,match(skey) against('${skey}' IN BOOLEAN MODE) t from unite_search a where type='hh' having t>0.01 order by t limit 5; " +" union all select a.*,match(skey) against('${skey}' IN BOOLEAN MODE) t from unite_search a where type='khh' having t>0.01 order by t limit 5; "
response.items=new ArrayList<Record>();
Sql sql= Sqls.create(sqlStr1)
sql.forceExecQuery()
sql.setCallback(Sqls.callback.records())
dao.execute(sql);
def record=sql.getList(Record.class)
response.items.addAll(record)
添加回复
请先登陆