Commit b1129b69 authored by yanzg's avatar yanzg

消除成功接收处理

parent 4882f071
...@@ -74,7 +74,7 @@ public class DbExecuteImpl implements DbExecute { ...@@ -74,7 +74,7 @@ public class DbExecuteImpl implements DbExecute {
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
try { try {
sql = this.handleParas(sql, paras); sql = this.handleParas(sql, paras);
jdbc.query(sql, new RowCallbackHandler() { RowCallbackHandler rowCallbackHandler = new RowCallbackHandler() {
@Override @Override
public void processRow(ResultSet rs) throws SQLException { public void processRow(ResultSet rs) throws SQLException {
AllBeanRowMapper<T> rowMap = AllBeanRowMapper.getInstance(cls, configDb); AllBeanRowMapper<T> rowMap = AllBeanRowMapper.getInstance(cls, configDb);
...@@ -82,7 +82,13 @@ public class DbExecuteImpl implements DbExecute { ...@@ -82,7 +82,13 @@ public class DbExecuteImpl implements DbExecute {
rowHandle.handle(data); rowHandle.handle(data);
row.value++; row.value++;
} }
}, paras); };
if (paras != null && paras.length > 0) {
jdbc.query(sql, rowCallbackHandler, paras);
} else {
jdbc.query(sql, rowCallbackHandler);
}
} finally { } finally {
printSql.print(targetClass, sqlName, start, row.value, sql, paras); printSql.print(targetClass, sqlName, start, row.value, sql, paras);
} }
......
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