Commit ca2d60c0 authored by Quxl's avatar Quxl

x

parent f6ae26bc
......@@ -335,10 +335,15 @@ public interface Dialect {
List<Object> args = new ArrayList<Object>();
if(objMap != null) {
for(String key : objMap.keySet()) {
Object val = objMap.get(key);
if(val == null) {
wheres.add(getColumnLeft() + key + getColumnRight() + " is null");
} else {
wheres.add(getColumnLeft() + key + getColumnRight() + " = ?");
args.add(objMap.get(key));
}
}
}
String sql = "select * from " + tableName + StringUtil.join(" and ", " where ", "", wheres);
return new Sql(sql, args.toArray());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment