diff --git a/worldsrv/lotterymgr.go b/worldsrv/lotterymgr.go index ea7779c..a0ff340 100644 --- a/worldsrv/lotterymgr.go +++ b/worldsrv/lotterymgr.go @@ -167,6 +167,7 @@ func (l *LotteryData) sendAward() { Name: l.Name, RoleId: l.RoleId, Price: l.Price, + WinCode: l.WinCode, }, } @@ -614,7 +615,7 @@ func (l *LotteryMgr) GetList(plt string) []*welfare.LotteryInfo { state = common.LotteryStateRun // 进行中 } - ret = append(ret, &welfare.LotteryInfo{ + info := &welfare.LotteryInfo{ Id: d.CId, StartTs: d.StartTs, EndTs: d.EndTs, @@ -631,7 +632,17 @@ func (l *LotteryMgr) GetList(plt string) []*welfare.LotteryInfo { Price: d.Price, NeedRoomCard: LotteryRoomCard, ImageURL: d.ImageURL, - }) + } + + if d.WinTs > 0 && d.WinTs > now.Unix() { + // 隐藏未发奖的中奖信息 + d.WinCode = "" + d.SnId = 0 + d.Name = "" + d.RoleId = 0 + } + + ret = append(ret, info) } sort.Slice(ret, func(i, j int) bool {