mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-07 10:40:25 +08:00
所有数据库相关的操作支持事务
This commit is contained in:
@@ -18,7 +18,9 @@ func (this *ServerDailyStatService) UploadServerDailyStats(ctx context.Context,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = models.SharedServerDailyStatDAO.SaveStats(req.Stats)
|
||||
tx := this.NullTx()
|
||||
|
||||
err = models.SharedServerDailyStatDAO.SaveStats(tx, req.Stats)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user