Compare commits

...

2 Commits

Author SHA1 Message Date
sk 88bbca47f1 推广渠道 2024-09-04 17:24:29 +08:00
sk 4a32df4ecf 竞技馆 2024-09-04 15:31:35 +08:00
4 changed files with 8 additions and 4 deletions

View File

@ -227,7 +227,7 @@ func (svc *PlayerDataSvc) CreatePlayerDataByThird(args *model.CreatePlayer, ret
var dataParams model.PlayerParams
json.Unmarshal([]byte(a.Params), &dataParams)
pd = model.NewPlayerDataThird(acc, name, args.HeadUrl, id, a.Channel, a.Platform, a.Params,
a.Tel, a.PackegeTag, dataParams.Ip, a.TagKey, a.AccountType, a.DeviceOs)
a.Tel, a.PackegeTag, dataParams.Ip, a.TagKey, a.AccountType, a.DeviceOs, a.ChannelId)
if pd != nil {
err = cplayerdata.Insert(pd)
if err != nil {

View File

@ -981,7 +981,7 @@ func NewPlayerData(acc string, name string, id int32, channel, platform string,
}
func NewPlayerDataThird(acc string, name, headUrl string, id int32, channel, platform string, params, tel string,
packTag, ip string, tagkey, accountType int32, deviceOS string) *PlayerData {
packTag, ip string, tagkey, accountType int32, deviceOS, channelId string) *PlayerData {
if len(name) == 0 {
logger.Logger.Trace("New player name is empty.")
return nil
@ -992,6 +992,7 @@ func NewPlayerDataThird(acc string, name, headUrl string, id int32, channel, pla
AccountId: acc,
Name: name,
Channel: channel,
ChannelId: channelId,
Platform: platform,
SnId: id,
Head: rand.Int31n(common.HeadRange),

View File

@ -1938,6 +1938,9 @@ func CSPlayerData(s *netlib.Session, packetid int, data interface{}, sid int64)
if (p.Channel == "" || p.Channel == "0") && p.Channel != msg.AppChannel {
p.Channel = msg.AppChannel
}
if ls.als.acc.ChannelId != "" && p.ChannelId == "" {
p.ChannelId = ls.als.acc.ChannelId
}
if ls.clog != nil {
PlayerSubjectSign.UpdateHeadUrl(p.SnId, ls.clog.HeadUrl)

View File

@ -485,7 +485,7 @@ func handlerEvent(ctx context.Context, completeKey string, isInit bool, event *c
config := data.(*webapi.RoomType)
PlatformMgrSingleton.UpdateRoomType(config)
if !isInit {
PlayerMgrSington.BroadcastMessageToPlatform(config.GetPlatform(), int(0), nil)
//PlayerMgrSington.BroadcastMessageToPlatform(config.GetPlatform(), int(0), nil)
}
case clientv3.EventTypeDelete:
if plt == "" || len(param) == 0 {
@ -493,7 +493,7 @@ func handlerEvent(ctx context.Context, completeKey string, isInit bool, event *c
}
PlatformMgrSingleton.DelRoomType(plt, int32(param[0]))
if !isInit {
PlayerMgrSington.BroadcastMessageToPlatform(plt, int(0), nil)
//PlayerMgrSington.BroadcastMessageToPlatform(plt, int(0), nil)
}
}