diff --git a/domain/model/groupPower_m/group_grade.go b/domain/model/groupPower_m/group_grade.go index 04a7ec74e75f2e56fbaf35256454f8d5404adae1..698f795a256d6824a1dcd57fb57273003002c87e 100644 --- a/domain/model/groupPower_m/group_grade.go +++ b/domain/model/groupPower_m/group_grade.go @@ -229,14 +229,15 @@ func IncrGroupPowerStarOnMic(model *domain.Model, groupPowerId, userId mysql.ID, return model.Transaction(func(model *domain.Model) error { star, err := GetGroupPowerMonthStar(model, groupPowerId, userId, groupPower_e.GroupPowerStarTypeActive) curTs := joinMicTimestamp + nowTs := time.Now().Unix() if err != nil && err != gorm.ErrRecordNotFound { return err } if star != nil && joinMicTimestamp == star.LastCalTs { curTs = star.LastCalTs } - score := time.Now().Unix() - curTs - return IncrGroupPowerMonthStarScore(model, groupPowerId, userId, groupPower_e.GroupPowerStarTypeActive, mysql.Num(score), curTs) + score := nowTs - curTs + return IncrGroupPowerMonthStarScore(model, groupPowerId, userId, groupPower_e.GroupPowerStarTypeActive, mysql.Num(score), nowTs) }) }