public boolean login(String name ,String password){
Sql sql = Sqls.create("select opname,oppassword from m_operator ");
sql.setCallback(new SqlCallback() {
@Override
public List<NutMap> invoke(Connection conn, ResultSet rs, Sql sql) throws SQLException {
List<NutMap> lists = new ArrayList<>();
while (rs.next()) {
NutMap lt = new NutMap();
lt.addv("name",rs.getString(1));
lt.addv("time",rs.getString(2));
lists.add(lt);
}
return lists;
}
});
dao().execute(sql);
List<NutMap> rest = sql.getList(List<NutMap>);
return rest;
}
sql.getList() 中List实体类应该怎么写呢?