try{
$this->user = D('User');
$this->user->startTrans(); //开始事务
$res = $this->user->Saveuser($where,$data);
$res1 = $this->user->Saveuser($where,$data);
if(!$res||!$res1){
throw new \Exception('数据实例化失败');
}
$this->user->commit(); //确认事务
}catch(\Exception $e){
$this->user->rollback(); //回滚
}
try{
$this->user = D('User');
$this