The Impl kind of thing works.
@Override Public intUpdatereturnall (intItemintStatusintIduser) { //TODO auto-generated Method Stub Try { intUpdatereturnall =itemmapper.update**** (); if(updatereturnall>0) {Map<string, object> map=NewHashmap<string,object>(); Map.put ("Idpatient", item); Map.put ("Chargedealwith", 0); Object Callupdateppfireturn=itemmapper.callupdate**** (map); System.out.println (Callupdateppfireturn+"=================="); System.out.println (Map.get ("Retmeg") + "----------"); if(!map.get ("Retmeg"). Equals ("")){ Throw NewException ("Callupdateppfireturn exception! "); } returnUpdatereturnall; }Else{ return0; } } Catch(Exception e) {transactionaspectsupport.currenttransactionstatus (). Setrollbackonly (); Logger.error ("Updatereturnall Abnormal!" ", E); return0; } }
If not
Transactionaspectsupport.currenttransactionstatus (). setrollbackonly (); Specify exception rollback, update is committed
Springmvc+mybaits a thing simultaneously update and call a stored procedure exception rollback