Commit a28a0a76 authored by hujiebin's avatar hujiebin

feat:事务操作

parent d5596af0
......@@ -131,7 +131,9 @@ func GetGroupPowerOnMic(model *domain.Model, groupPowerId, userId mysql.ID) (*Gr
const MaxMinuteTimes = 18
// 增加势力上麦经验
// 事务操作
func IncrGroupPowerExpOnMic(model *domain.Model, groupPowerId, userId mysql.ID, joinMicTimestamp int64) error {
return model.Transaction(func(model *domain.Model) error {
// 获取用户上麦奖励历史
onMicDetails, err := GetGroupPowerUserOnMicDetails(model, groupPowerId, userId)
if err != nil {
......@@ -185,4 +187,5 @@ func IncrGroupPowerExpOnMic(model *domain.Model, groupPowerId, userId mysql.ID,
}
}
return nil
})
}
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