SQL与事务 事务 $user = new User();$user->setName('name');$user->setDesc('this my desc');$userId = $user->save()->getResult();$count = new Count();$count->setFans(mt_rand(1, 100));$countId = $count->save()->getResult();Db::commit();