| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- package service
- import (
- "bet24.com/log"
- "bet24.com/servers/coreservice/agent"
- "bet24.com/servers/coreservice/announce"
- "bet24.com/servers/coreservice/award"
- "bet24.com/servers/coreservice/bet"
- "bet24.com/servers/coreservice/card"
- "bet24.com/servers/coreservice/chat"
- "bet24.com/servers/coreservice/client"
- "bet24.com/servers/coreservice/coupontask"
- "bet24.com/servers/coreservice/exchange"
- "bet24.com/servers/coreservice/friend"
- "bet24.com/servers/coreservice/gamelist"
- "bet24.com/servers/coreservice/giftpack"
- "bet24.com/servers/coreservice/gold2chipwheel"
- "bet24.com/servers/coreservice/jackpot"
- "bet24.com/servers/coreservice/keyword"
- "bet24.com/servers/coreservice/limiteditems"
- "bet24.com/servers/coreservice/monthlycard"
- "bet24.com/servers/coreservice/newusergift"
- "bet24.com/servers/coreservice/prizewheel"
- "bet24.com/servers/coreservice/purchase"
- "bet24.com/servers/coreservice/qqwry"
- "bet24.com/servers/coreservice/rank"
- "bet24.com/servers/coreservice/redpoint"
- "bet24.com/servers/coreservice/shop"
- "bet24.com/servers/coreservice/signin"
- "bet24.com/servers/coreservice/signinwheel"
- "bet24.com/servers/coreservice/slotscore"
- "bet24.com/servers/coreservice/spread"
- "bet24.com/servers/coreservice/subsidy"
- "bet24.com/servers/coreservice/teacher"
- "bet24.com/servers/coreservice/track"
- "bet24.com/servers/coreservice/userwin"
- "bet24.com/servers/coreservice/video"
- "bet24.com/servers/coreservice/vitality"
- activityservice "bet24.com/servers/micros/activityservice/proto"
- inventory "bet24.com/servers/micros/item_inventory/proto"
- notification "bet24.com/servers/micros/notification/proto"
- task "bet24.com/servers/micros/task/proto"
- robot "bet24.com/servers/micros/userservices/proto"
- vipservice "bet24.com/servers/micros/userservices/proto"
- )
- type manager struct {
- }
- func newManager() *manager {
- qqwry.Run()
- rank.Run()
- monthlycard.Run()
- giftpack.Run()
- shop.Run()
- prizewheel.Run()
- subsidy.Run()
- vitality.Run()
- redpoint.Run()
- exchange.Run()
- bet.Run()
- chat.Run()
- friend.Run()
- jackpot.Run()
- signinwheel.Run()
- track.Run()
- newusergift.Run()
- spread.Run() // 推广
- video.Run() // 视频
- teacher.Run() // 师徒
- coupontask.Run() // 红包券任务
- slotscore.Run()
- gamelist.Run()
- signin.Run()
- agent.Run() // 代理体系
- gold2chipwheel.Run()
- purchase.Run() // 100K购
- award.Run() // 奖励模块
- limiteditems.Run()
- keyword.Run()
- //battlepass.Run(inventory.AddItems)
- announce.Run() // 公告
- card.Run()
- userwin.Run()
- log.Release("coreservice running")
- return mgr
- }
- func (m *manager) onUserEnter(userId int, ipAddress string) client.Response {
- var ret client.Response
- ret.RetCode = 1
- if robot.IsRobot(userId) {
- return ret
- }
- log.Debug("manager.onUserEnter %d", userId)
- notification.AddUser(userId)
- friend.AddUser(userId)
- inventory.AddUser(userId, ipAddress)
- signin.AddUser(userId)
- task.AddUser(userId)
- //userservices.AddUser(userId)
- vitality.AddUser(userId)
- monthlycard.AddUser(userId)
- giftpack.AddUser(userId)
- prizewheel.AddUser(userId)
- video.AddUser(userId)
- coupontask.AddUser(userId)
- redpoint.AddUser(userId) // 放到最后
- chat.OnUserEnter(userId)
- userwin.AddUser(userId)
- vipservice.AddUser(userId) // 新版vip
- activityservice.AddUser(userId)
- return ret
- }
- func (m *manager) onUserExit(userId int) client.Response {
- var ret client.Response
- ret.RetCode = 1
- if robot.IsRobot(userId) {
- return ret
- }
- log.Debug("manager.onUserExit %d", userId)
- notification.RemoveUser(userId)
- redpoint.RemoveUser(userId)
- inventory.RemoveUser(userId)
- signin.RemoveUser(userId)
- task.RemoveUser(userId)
- //userservices.RemoveUser(userId)
- vitality.RemoveUser(userId)
- monthlycard.RemoveUser(userId)
- giftpack.RemoveUser(userId)
- friend.RemoveUser(userId)
- prizewheel.RemoveUser(userId)
- video.RemoveUser(userId)
- coupontask.RemoveUser(userId)
- userwin.RemoveUser(userId)
- chat.OnUserExit(userId)
- vipservice.RemoveUser(userId) // 新版vip
- activityservice.RemoveUser(userId)
- return ret
- }
- func (m *manager) syncUserList(userlist []int) {
- }
|