Commit 8697f5f4 authored by Quxl's avatar Quxl

x

parent 86fd1903
......@@ -333,10 +333,12 @@ public interface Dialect {
default Sql argsQuery(String tableName, Map<String, Object> objMap) {
List<String> wheres = new ArrayList<String>();
List<Object> args = new ArrayList<Object>();
if(objMap != null) {
for(String key : objMap.keySet()) {
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