From df970b40488be0a59276ea10b8cd50882531a4a5 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 9 Dec 2022 19:03:41 +0800 Subject: [PATCH] test --- svc/svc_day_luck_draw_reward.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 }