Commit 74fc263d authored by hujiebin's avatar hujiebin

fix

parent 44052473
......@@ -182,7 +182,14 @@ func IncrGroupPowerExpOnMic(model *domain.Model, groupPowerId, userId mysql.ID,
// 更新micExp信息
onMic.Seconds = onMic.Seconds + onMicSeconds
onMic.LastCalTs = joinMicTimestamp
if err := model.DB().Save(onMic).Error; err != nil {
if err := model.DB().Model(GroupPowerOnMic{}).Clauses(clause.OnConflict{Columns: []clause.Column{{Name: "date"}, {Name: "group_power_id"}},
DoUpdates: clause.Assignments(
map[string]interface{}{
"seconds": onMic.Seconds,
"last_cal_ts": joinMicTimestamp,
},
)}).
Create(onMic).Error; err != nil {
return err
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment