35 lines
799 B
Go
35 lines
799 B
Go
package main
|
|
|
|
import (
|
|
"time"
|
|
|
|
"mongo.games.com/game/common"
|
|
"mongo.games.com/game/model"
|
|
)
|
|
|
|
// SaveInviteScore 保存玩家操作
|
|
// 绑定,充值成功,充值;及产生的积分,充值金额
|
|
func SaveInviteScore(data *model.InviteScore) {
|
|
if data == nil {
|
|
return
|
|
}
|
|
cfg := PlatformMgrSingleton.GetConfig(data.Platform).ActInviteConfig
|
|
data.Rate = cfg.GetRates()
|
|
LogChannelSingleton.WriteLog(&model.EvtInviteMsg{
|
|
InviteScore: *data,
|
|
RechargeScore: cfg.GetRechargeScore(),
|
|
})
|
|
}
|
|
|
|
// CheckNewWeek 每周重置积分
|
|
func CheckNewWeek(platform string, snid int32) {
|
|
LogChannelSingleton.WriteLog(&model.EvtInviteMsg{
|
|
InviteScore: model.InviteScore{
|
|
Platform: platform,
|
|
SnId: snid,
|
|
Tp: common.InviteScoreCheckWeek,
|
|
Ts: time.Now().Unix(),
|
|
},
|
|
})
|
|
}
|