nutz 自定义sql语句
益思博
2023-12-01
Sql sql = Sqls.create("select feil_mc from work_feilv_sm where feil_sy = 1");
sql.setCallback(new SqlCallback() {
@Override
public Object invoke(java.sql.Connection conn, ResultSet rs, Sql sql) throws SQLException {
List<String> list = new LinkedList<String>();
while (rs.next())
list.add(rs.getString("feil_mc"));
return list;
}
});
dao.execute(sql);
List<String> sq = sql.getList(String.class);