Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
788cb2e6d4 | ||
|
|
dd8c05b344 |
@@ -212,15 +212,18 @@ func (s *sGameAct) Save(ctx context.Context, actId int) (err error) {
|
||||
if len(delKey) > 0 {
|
||||
for _, v := range update {
|
||||
v.UpdatedAt = gtime.Now()
|
||||
_, err2 := g.Model(Name).Where(do.GameAct{
|
||||
Uid: v.Uid,
|
||||
ActId: v.ActId,
|
||||
UpdatedAt: v.UpdatedAt,
|
||||
updateRes, err2 := g.Model(Name).Where(do.GameAct{
|
||||
Uid: v.Uid,
|
||||
ActId: v.ActId,
|
||||
}).Data(v).Update()
|
||||
if err2 != nil {
|
||||
g.Log().Error(ctx, err2)
|
||||
return
|
||||
}
|
||||
if row, _ := updateRes.RowsAffected(); row == 0 {
|
||||
g.Log().Error(ctx, "本次更新为0,更新数据失败: %v", v)
|
||||
return
|
||||
}
|
||||
}
|
||||
update = make([]*entity.GameAct, 0)
|
||||
var count int64
|
||||
|
||||
Reference in New Issue
Block a user