提高kv持久化安全性,按需删除用户缓存

This commit is contained in:
ayflying
2025-09-01 18:35:43 +08:00
parent ce8ae4d26a
commit cd3de96761
2 changed files with 27 additions and 26 deletions

View File

@@ -225,7 +225,7 @@ func (s *sGameAct) Save(ctx context.Context, actId int) (err error) {
}
if row, _ := updateRes.RowsAffected(); row == 0 {
g.Log().Error(ctx, "本次更新为0更新数据失败: %v", v)
return
continue
}
//删除缓存
@@ -255,7 +255,6 @@ func (s *sGameAct) Save(ctx context.Context, actId int) (err error) {
g.Log().Debugf(ctx, "当前act%vadd写入数据: %v,内容:%v", vTemp.ActId, vTemp.Uid, vTemp.Action)
}
return
}
for _, v2 := range add {