This commit is contained in:
aozhiwei 2024-11-22 14:38:34 +08:00
parent 9fa67d7092
commit ffabf29e39
2 changed files with 6 additions and 0 deletions

View File

@ -54,3 +54,7 @@ func (this *Buff) FindByBuffId(accountId string, buffId int32) (error, bool) {
return nil, result.RowsAffected > 0
}
}
func (this *Buff) UpdateExpireTime() error {
return this.UpdateFields([]string{"expires_time", "modifytime"})
}

View File

@ -51,6 +51,8 @@ func (this *buff) Add(accountId string, buffList []int32) {
} else {
buffModel.ExpiresTime += buffMeta.GetDurationTime()
}
buffModel.ModifyTime = nowTime
buffModel.UpdateExpireTime()
}
}
}