DB::beginTransaction(); try { DB::table('funds')->insert($data); DB::table('users')->where('id', $uid)->increment('balance', $fee); } catch (\Exception $e) { DB::rollBack(); Log::channel('mysql_error')->info($e); } DB::commit();
事物使用
最新推荐文章于 2022-03-02 17:23:08 发布