官网关于Yii2 事务的说明文档 http://www.yiiframework.com/doc-2.0/guide-db-active-record.html Working with Transactions There are two ways of using transactions while working with Active Record. The first way is to explicitly enclose Active Record method calls in…