diff --git a/model/bankruptlog.go b/model/bankruptlog.go index 6ab54de..47efa36 100644 --- a/model/bankruptlog.go +++ b/model/bankruptlog.go @@ -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"` diff --git a/model/relieffundlog.go b/model/relieffundlog.go index a0ec914..6d6c1bd 100644 --- a/model/relieffundlog.go +++ b/model/relieffundlog.go @@ -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() diff --git a/worldsrv/welfmgr.go b/worldsrv/welfmgr.go index 6f89d1a..af6f5ef 100644 --- a/worldsrv/welfmgr.go +++ b/worldsrv/welfmgr.go @@ -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)