diff --git a/svc/svc_day_luck_draw_reward.go b/svc/svc_day_luck_draw_reward.go index 1da0a31..bdc1e8a 100644 --- a/svc/svc_day_luck_draw_reward.go +++ b/svc/svc_day_luck_draw_reward.go @@ -58,10 +58,10 @@ func GetUserReward(eg *xorm.Engine, mid string, isTask bool) error { if err != nil { return err } - defer cache.Del(mutexKey) if operationSumAvailable != "OK" { return errors.New("上一次未运行完成") } + defer cache.Del(mutexKey) sess := eg.NewSession() defer func() { sess.Close() @@ -169,10 +169,10 @@ func GetUserReward(eg *xorm.Engine, mid string, isTask bool) error { awardCount, ok := awardIdMap[awardId] //查下总数量 rewardDataCount, ok1 := rewardDataMap[awardId] - if ok == false { + if ok1 == false { continue } - if ok1 { + if ok { if awardCount+1 > rewardDataCount { continue }