Skip to content

Commit

Permalink
bugfix 分组创建时会自动更新期望执行时间
Browse files Browse the repository at this point in the history
  • Loading branch information
mylxsw committed Jul 23, 2020
1 parent 7784b04 commit ed4b527
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
16 changes: 8 additions & 8 deletions api/static.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion internal/repository/impl/message_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (m MessageGroupRepo) CollectingGroup(rule repository.MessageGroupRule) (gro
err = m.col.FindOneAndUpdate(
context.TODO(),
bson.M{"rule._id": rule.ID, "status": repository.MessageGroupStatusCollecting},
bson.M{"$set": bson.M{"rule": rule}},
bson.M{"$set": bson.M{"status": repository.MessageGroupStatusCollecting}},
options.FindOneAndUpdate().SetUpsert(true).SetReturnDocument(options.After),
).Decode(&group)

Expand All @@ -149,6 +149,7 @@ func (m MessageGroupRepo) CollectingGroup(rule repository.MessageGroupRule) (gro
group.SeqNum = seq.Value
}

group.Rule = rule
_ = m.UpdateID(group.ID, group)
}

Expand Down

0 comments on commit ed4b527

Please sign in to comment.