pool.getConnection(function(err,conn){
if(!err){
conn.beginTransaction(function(err){
var billdata = {
webi_guid:db.newGuid(),
weor_code:'test111',
webi_paywecode:'1111',
webi_totalfee:100
};
conn.query('insert into we_bill set ?',billdata,function(err,rows){
console.log('sss'+err);
conn.rollback(function(err){console.log(err)});
//conn.commit();
conn.release();
return;
});
});
}
else{
console.log('err');
};
});
7 回复