Commit ca2d60c0 authored by Quxl's avatar Quxl

x

parent f6ae26bc
...@@ -335,8 +335,13 @@ public interface Dialect { ...@@ -335,8 +335,13 @@ public interface Dialect {
List<Object> args = new ArrayList<Object>(); List<Object> args = new ArrayList<Object>();
if(objMap != null) { if(objMap != null) {
for(String key : objMap.keySet()) { for(String key : objMap.keySet()) {
wheres.add(getColumnLeft() + key + getColumnRight() + " = ?"); Object val = objMap.get(key);
args.add(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); String sql = "select * from " + tableName + StringUtil.join(" and ", " where ", "", wheres);
......
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