fix 红包活动
This commit is contained in:
parent
2aff7b19fb
commit
2bcbfaec2f
|
@ -65,3 +65,21 @@ func UpdateRedPacketAll(plt string, list []*RedPacket) error {
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
// 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 // 消耗钻石数量
|
||||
|
||||
}
|
||||
|
|
|
@ -19,6 +19,8 @@ const (
|
|||
BackSystemJyb = "back_jyblog"
|
||||
BackActivityLog = "back_activitylog"
|
||||
BackOnlineGame = "back_onlinegame"
|
||||
BackRedPacket = "back_redpacket"
|
||||
BackConsumeTask = "back_consumetask"
|
||||
)
|
||||
|
||||
// go后端
|
||||
|
|
|
@ -2425,6 +2425,7 @@ func (this *WelfareMgr) GetRedPacket(p *Player, id int64) *welfare.SCRedPacketDr
|
|||
RedPacketMgrInst.AddUse(p.Platform, id, reward)
|
||||
if reward > 0 {
|
||||
data.RN++
|
||||
pack.Award = []*welfare.PropInfo{{ItemId: cfg.GetItemId(), ItemNum: reward}}
|
||||
BagMgrSingleton.AddItems(&model.AddItemParam{
|
||||
Platform: p.Platform,
|
||||
SnId: p.GetSnId(),
|
||||
|
@ -2435,10 +2436,17 @@ func (this *WelfareMgr) GetRedPacket(p *Player, id int64) *welfare.SCRedPacketDr
|
|||
})
|
||||
}
|
||||
|
||||
//todo 抽奖记录
|
||||
mq.Write(&model.BackRedPacket{
|
||||
Platform: p.Platform,
|
||||
Id: int32(id),
|
||||
SnId: p.GetSnId(),
|
||||
ItemId: cfg.GetItemId(),
|
||||
ItemNum: reward,
|
||||
Ts: now,
|
||||
}, mq.BackRedPacket)
|
||||
|
||||
_, pack.RemainCount = RedPacketMgrInst.GetRemainTimesByConfig(p, cfg)
|
||||
p.SendToClient(int(welfare.SPacketID_PACKET_SCRedPacketDraw), pack)
|
||||
Send(welfare.OpResultCode_OPRC_Sucess)
|
||||
return pack
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue