比赛log保存数据库修改

This commit is contained in:
by 2024-05-14 11:38:44 +08:00
parent d534e73613
commit 06695defa6
1 changed files with 9 additions and 6 deletions

View File

@ -1491,10 +1491,13 @@ func (this *Tournament) MakeMatchLog(platform string, tmId, sortId int32) *model
} }
func (this *Tournament) saveMatchLog(matchLog *model.MatchLog) { func (this *Tournament) saveMatchLog(matchLog *model.MatchLog) {
err := model.InsertMatchLogs(matchLog) task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
if err != nil { return nil
logger.Logger.Error("saveMatchLog error %v", err) }), task.CompleteNotifyWrapper(func(data interface{}, tt task.Task) {
return err := model.InsertMatchLogs(matchLog)
} if err != nil {
logger.Logger.Error("saveMatchLog error %v", err)
return
}
})).StartByFixExecutor("saveMatchLogTask")
} }