1、nutz版本1.r.55
2、代码
public List<Login> getListBySqlWhere(String where) {
try {
Sql sql = Sqls.create(" select * from login " + where + " ");
sql.setCallback(Sqls.callback.entities());
sql.setEntity(this.dao().getEntity(Login.class));
this.dao().execute(sql);
List<Login> logins = sql.getList(Login.class);
return logins;
} catch (Exception e) {
return null;
}
}
3、现象:传入的where中 的txtLoginName 为 niehuanforever@163.com
经过Sqls.create之后是
select * from login where txtLoginName ='niehuanforeverNULL.com' and txtLoginPassword = '230542' and txtType='老师'