From ca8a8dfb7ebc048a0b8f5ce96d3cd7f1f56a4753 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Tue, 29 Oct 2024 11:17:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AB=9E=E6=8A=80=E9=A6=86?= =?UTF-8?q?=E6=8A=BD=E5=A5=96=E5=BF=85=E4=B8=AD=E7=8E=A9=E5=AE=B6=E6=98=B5?= =?UTF-8?q?=E7=A7=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/lotterymgr.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/worldsrv/lotterymgr.go b/worldsrv/lotterymgr.go index f729219..cc8b20a 100644 --- a/worldsrv/lotterymgr.go +++ b/worldsrv/lotterymgr.go @@ -309,6 +309,15 @@ func (l *LotteryData) Done() { if code != nil && isMust { code.SnId = awardPlayer.SnId } + if code == nil && isMust { + code = &model.LotteryCode{ + Platform: l.Platform, + SnId: awardPlayer.SnId, + CId: l.CId, + StartTs: l.StartTs, + Code: fmt.Sprintf("%d", l.TotalCode), + } + } // 查询玩家消耗 if code != nil && code.SnId > 0 { list, err := model.GetLottery(l.Platform, code.SnId, l.CId, l.StartTs) @@ -342,15 +351,6 @@ func (l *LotteryData) Done() { defer func() { l.isDone = false }() - if code == nil && isMust { - code = &model.LotteryCode{ - Platform: l.Platform, - SnId: awardPlayer.SnId, - CId: l.CId, - StartTs: l.StartTs, - Code: fmt.Sprintf("%d", l.TotalCode), - } - } if code == nil { return }