Commit 3e8017b0 authored by hujiebin's avatar hujiebin

积分清零后,等级保持一段时间

parent 81ed03aa
......@@ -69,7 +69,7 @@ func IncrGroupPowerExp(txModel *domain.Model, groupPowerId mysql.ID, exp int64)
}
for grade := groupPower_e.GroupPowerGradeMax; grade >= groupPower_e.GroupPowerGrade0; grade-- {
if latestGrade.Exp > groupPower_e.GroupPowerGradeExp[grade] {
if latestGrade.Grade != grade {
if latestGrade.Grade < grade { // 积分清零后,等级保持一段时间
expireAt := now.EndOfMonth()
expireAt = utils.AddDate(expireAt, 0, 1) // 等级有效期到下个月月底
updateAttrs := map[string]interface{}{
......
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