public boolean updateCheckRusultList(final List updateData) {
try{
getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
public Object doInSqlMapClient(SqlMapExecutor executor)
throws SQLException {
executor.startBatch();
for (Iterator i2=updateData.iterator(); i2.hasNext();){
SourceCodeCheckResult result = (SourceCodeCheckResult)i2.next() ;
logger.info("Update the reason and comment:Id-"+result.getLogId());
executor.update("SouceCodeCheckRule.updateCheckLog",result);
}
executor.executeBatch();
return null;
}
});
return true;
}catch(Exception e){
return false;
}
}
ibatis批量Update
最新推荐文章于 2021-02-23 17:29:41 发布