fix 红包活动

This commit is contained in:
sk 2025-01-03 15:50:06 +08:00
parent 2bcbfaec2f
commit 5db3c767e4
3 changed files with 10 additions and 15 deletions

View File

@ -68,18 +68,10 @@ func UpdateRedPacketAll(plt string, list []*RedPacket) error {
// BackRedPacket 红包统计数据
type BackRedPacket struct {
Platform string
Id int32
SnId int32
ItemId int32
ItemNum int64
Ts int64
}
type BackActivityConsume struct {
Platform string
TaskId int32 // 任务id
SnId int32
Num int64 // 消耗钻石数量
Platform string // 平台
Id int32 // 红包活动id
SnId int32 // 玩家id
ItemId int32 // 道具id
ItemNum int64 // 道具数量
Ts int64 // 时间戳
}

View File

@ -20,7 +20,6 @@ const (
BackActivityLog = "back_activitylog"
BackOnlineGame = "back_onlinegame"
BackRedPacket = "back_redpacket"
BackConsumeTask = "back_consumetask"
)
// go后端

View File

@ -2324,6 +2324,10 @@ func (this *WelfareMgr) GetRedPacket(p *Player, id int64) *welfare.SCRedPacketDr
return nil
}
if p.WelfData.RedPacket == nil {
p.WelfData.RedPacket = make(map[int64]*model.RedPacketData)
}
if p.WelfData.RedPacket[id] == nil {
p.WelfData.RedPacket[id] = &model.RedPacketData{}
}