添加渠道信息

This commit is contained in:
sk 2024-04-28 11:45:43 +08:00
parent 4d9fee9b11
commit 2e6928f317
3 changed files with 4 additions and 12 deletions

View File

@ -3,11 +3,6 @@ package model
import "time"
import "github.com/globalsign/mgo/bson"
// 破产次数统计
var (
BankruptLogCollName = "log_bankrupt"
)
// 破产次数统计
type BankruptLog struct {
LogId bson.ObjectId `bson:"_id"`

View File

@ -3,16 +3,12 @@ package model
import "time"
import "github.com/globalsign/mgo/bson"
// 破产金领取详情
var (
ReliefFundLogCollName = "log_relieffund"
)
// 破产金领取详情
type ReliefFundLog struct {
LogId bson.ObjectId `bson:"_id"`
SnId int32 //玩家id
Platform string //平台名称
Channel string // 渠道
CreateTime int64 // 注册时间
Ts int64 // 领取时间
@ -26,10 +22,11 @@ func NewReliefFundLog() *ReliefFundLog {
return log
}
func NewReliefFundLogEx(snid int32, gettype, cointype int32, getamount, createtime int64, platform string) *ReliefFundLog {
func NewReliefFundLogEx(snid int32, gettype, cointype int32, getamount, createtime int64, platform, channel string) *ReliefFundLog {
cl := NewReliefFundLog()
cl.SnId = snid
cl.Platform = platform
cl.Channel = channel
now := time.Now()
cl.Ts = now.Unix()

View File

@ -111,7 +111,7 @@ func (this *WelfareMgr) GetReliefFund(p *Player, isVideo bool) {
getType = model.SystemFreeGive_GiveType_ShopAd
}
log := model.NewReliefFundLogEx(p.SnId, getType, model.SystemFreeGive_CoinType_Coin, coin, p.CreateTime.Unix(), p.Platform)
log := model.NewReliefFundLogEx(p.SnId, getType, model.SystemFreeGive_CoinType_Coin, coin, p.CreateTime.Unix(), p.Platform, p.Channel)
if log != nil {
LogChannelSingleton.WriteLog(log)
logger.Logger.Tracef("NewReliefFundLogEx WriteLog snid: %v Coin:%v", p.SnId, pack.Coin)