- /* (non-Javadoc)
- * @see com.normandy.position.dao.NorTradeDAO#batchUpdateOrderList(java.util.List)
- */
- public void batchUpdateOrderList(final List<NorTradeDO> list) {
- if(null == list || 0 == list.size()){
- throw new IllegalArgumentException("can not batch update with null list.");
- }
- getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
- public Object doInSqlMapClient(SqlMapExecutor sme) throws SQLException {
- sme.startBatch();
- for(NorTradeDO norTradeDO : list){
- sme.update("TRADE-NOR-UPDATE", norTradeDO);
- }
- sme.executeBatch();
- return null;
- }
- });
- }
Ibatis批量操作,代码模板如下:
最新推荐文章于 2018-10-13 14:15:55 发布