try{
conn.setAutoCommit(false);
boolean result=updateEcAccount(ecAccountInfo,conn);
int result1=createEcConsume(ecConsumeInfo,conn);
if(result && result1>0)
{
conn.commit();
return true;
}
conn.rollback();
return false;
}catch(Exception e)
{
try{
conn.rollback();
}catch(Exception ex){}
}finally{
try{
if(conn!=null)conn.close();
}catch(Exception e){}
}
注意:将表类型由"MyISAM"改为"InnoDB"