日志写入

This commit is contained in:
meixiongfeng 2023-12-13 17:15:20 +08:00
parent 1edaf27db2
commit b99226a3f1
178 changed files with 245 additions and 221 deletions

View File

@ -69,7 +69,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.AcademyReceiveRe
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype151, 1)) this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype151, 1))
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "AcademyReceiveReq", level.Award) this.module.WriteUserLog(session.GetUserId(),req, comm.GMResAddType, "AcademyReceiveReq", level.Award)
}) })
} }

View File

@ -67,7 +67,7 @@ func (this *apiComp) TeachingReceive(session comm.IUserSession, req *pb.AcademyT
this.module.DispenseRes(session, level.Award, true) this.module.DispenseRes(session, level.Award, true)
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "AcademyTeachingReceiveReq", level.Award) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "AcademyTeachingReceiveReq", level.Award)
}) })
} }
session.SendMsg(string(this.module.GetType()), "teachingreceive", &pb.AcademyTeachingReceiveResp{Issucc: true}) session.SendMsg(string(this.module.GetType()), "teachingreceive", &pb.AcademyTeachingReceiveResp{Issucc: true})

View File

@ -81,7 +81,7 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.AchieveAwardReq) (
session.SendMsg(string(this.module.GetType()), "award", &pb.AchieveAwardResp{Id: req.Id, Award: atno}) session.SendMsg(string(this.module.GetType()), "award", &pb.AchieveAwardResp{Id: req.Id, Award: atno})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "AchieveAwardReq", conf.TaskReward) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "AchieveAwardReq", conf.TaskReward)
}) })
return return
} }

View File

@ -99,7 +99,7 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.ActivityGetRew
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "ActivityGetRewardReq", reward) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "ActivityGetRewardReq", reward)
}) })
return return
} }

View File

@ -77,7 +77,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.AddRechargeRecei
session.SendMsg(string(this.module.GetType()), "receive", &pb.AddRechargeReceiveResp{Id: req.Id, Award: award}) session.SendMsg(string(this.module.GetType()), "receive", &pb.AddRechargeReceiveResp{Id: req.Id, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "AddRechargeReceiveReq", award) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "AddRechargeReceiveReq", award)
}) })
return return
} }

View File

@ -79,7 +79,7 @@ func (this *apiComp) ReceiveAll(session comm.IUserSession, req *pb.AddRechargeRe
}) })
session.SendMsg(string(this.module.GetType()), "receiveall", &pb.AddRechargeReceiveAllResp{Record: info.Record, Award: award}) session.SendMsg(string(this.module.GetType()), "receiveall", &pb.AddRechargeReceiveAllResp{Record: info.Record, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "AddRechargeReceiveAllReq", award) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "AddRechargeReceiveAllReq", award)
}) })
return return
} }

View File

@ -99,8 +99,8 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ArenaBuyReq) (errdat
session.SendMsg(string(this.module.GetType()), "buy", &pb.MoonfantasyBuyResp{Issucc: true, BattleNum: info.Buynum}) session.SendMsg(string(this.module.GetType()), "buy", &pb.MoonfantasyBuyResp{Issucc: true, BattleNum: info.Buynum})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MoonfantasyBuyReq", []*cfg.Gameatn{{A: ticketitem.A, T: ticketitem.T, N: req.BuyNum}}) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "MoonfantasyBuyReq", []*cfg.Gameatn{{A: ticketitem.A, T: ticketitem.T, N: req.BuyNum}})
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "MoonfantasyBuyReq", need) // 消耗资源 this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "MoonfantasyBuyReq", need) // 消耗资源
}) })
return return
} }

View File

@ -55,7 +55,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallenge
return return
} }
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "ArenaChallengeReq", this.module.ModuleTools.GetGlobalConf().ArenaTicketCos) // 消耗资源 this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "ArenaChallengeReq", this.module.ModuleTools.GetGlobalConf().ArenaTicketCos) // 消耗资源
}) })
if red.Attack != nil { if red.Attack != nil {
for i, v := range req.Battle.Format { for i, v := range req.Battle.Format {

View File

@ -289,7 +289,7 @@ func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaCha
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...) this.module.ModuleBuried.TriggerBuried(session, tasks...)
if bReward { if bReward {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "ArenaChallengeRewardReq", reward.WinReward) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "ArenaChallengeRewardReq", reward.WinReward)
} }
}) })

View File

@ -45,7 +45,7 @@ func (this *apiComp) Plot(session comm.IUserSession, req *pb.ArenaPlotReq) (errd
return return
} }
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "ArenaPlotReq", this.module.ModuleTools.GetGlobalConf().ArenaTicketCos) // 消耗资源 this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "ArenaPlotReq", this.module.ModuleTools.GetGlobalConf().ArenaTicketCos) // 消耗资源
}) })
if errdata, record = this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{ if errdata, record = this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{

View File

@ -98,7 +98,7 @@ func (this *apiComp) PlotReward(session comm.IUserSession, req *pb.ArenaPlotRewa
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "ArenaPlotRewardReq", atno) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "ArenaPlotRewardReq", atno)
}) })
return return
} }

View File

@ -73,7 +73,7 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.AtlasAwardReq) (er
Res: respRes, Res: respRes,
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "AtlasAwardReq", respRes) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "AtlasAwardReq", respRes)
}) })
return return
} }

View File

@ -63,7 +63,7 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.CanineRabbitAwardR
session.SendMsg(string(this.module.GetType()), "award", &pb.CanineRabbitAwardResp{Type: req.Type, Awardmap: info.Award, Award: atno}) session.SendMsg(string(this.module.GetType()), "award", &pb.CanineRabbitAwardResp{Type: req.Type, Awardmap: info.Award, Award: atno})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CanineRabbitAwardReq", res) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "CanineRabbitAwardReq", res)
}) })
return return
} }

View File

@ -71,7 +71,7 @@ func (this *apiComp) AllWeekReward(session comm.IUserSession, req *pb.Captureshe
} }
session.SendMsg(string(this.module.GetType()), "allweekreward", &pb.CapturesheepAllWeekRewardResp{Weekreward: info.Weekreward, Award: award}) session.SendMsg(string(this.module.GetType()), "allweekreward", &pb.CapturesheepAllWeekRewardResp{Weekreward: info.Weekreward, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CapturesheepAllWeekRewardReq", award) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "CapturesheepAllWeekRewardReq", award)
}) })
return return
} }

View File

@ -134,7 +134,7 @@ func (this *apiComp) Over(session comm.IUserSession, req *pb.CapturesheepOverReq
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CapturesheepOverReq", award) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "CapturesheepOverReq", award)
}) })
return return
} }

View File

@ -74,7 +74,7 @@ func (this *apiComp) WeekReward(session comm.IUserSession, req *pb.CapturesheepW
session.SendMsg(string(this.module.GetType()), "weekreward", &pb.CapturesheepWeekRewardResp{Id: req.Id, Award: award}) session.SendMsg(string(this.module.GetType()), "weekreward", &pb.CapturesheepWeekRewardResp{Id: req.Id, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CapturesheepWeekRewardReq", award) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "CapturesheepWeekRewardReq", award)
}) })
return return
} }

View File

@ -116,7 +116,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
this.module.Errorf("获得虚拟币失败:%v", errdata) this.module.Errorf("获得虚拟币失败:%v", errdata)
} }
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "troll sell", addRes) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "troll sell", addRes)
}) })
this.module.ArrayBag(caravan) this.module.ArrayBag(caravan)
@ -228,7 +228,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
this.module.Errorf("获得虚拟币失败:%v", errdata) this.module.Errorf("获得虚拟币失败:%v", errdata)
} }
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "troll buy", []*cfg.Gameatn{{ this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "troll buy", []*cfg.Gameatn{{
A: "attr", A: "attr",
T: "merchantmoney", T: "merchantmoney",
N: addScore, N: addScore,

View File

@ -99,7 +99,7 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.CaravanGetRewa
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CaravanGetRewardReq", atno) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "CaravanGetRewardReq", atno)
}) })
return return
} }

View File

@ -133,7 +133,7 @@ func (this *apiComp) GotoCity(session comm.IUserSession, req *pb.CaravanGotoCity
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...) this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "CaravanGotoCityReq", res) // 消耗资源 this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "CaravanGotoCityReq", res) // 消耗资源
}) })
return return
} }

View File

@ -222,7 +222,7 @@ func (this *Caravan) InitCaravanTicket(session comm.IUserSession, conf *cfg.Game
errdata = this.DispenseRes(session, res, true) // 推送门票和虚拟币资源 errdata = this.DispenseRes(session, res, true) // 推送门票和虚拟币资源
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.WriteUserLog(session.GetUserId(), 0, "InitCaravanTicket", res) this.WriteUserLog(session.GetUserId(), "", 0, "InitCaravanTicket", res)
}) })
return return
} }
@ -340,7 +340,7 @@ func (this *Caravan) CheckCaravanTask(session comm.IUserSession, data *pb.DBCara
O: "", O: "",
}) })
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.WriteUserLog(session.GetUserId(), comm.GMResDelType, "CheckCaravanTask", resp.Reward) // 消耗资源 this.WriteUserLog(session.GetUserId(), "", comm.GMResDelType, "CheckCaravanTask", resp.Reward) // 消耗资源
}) })
} }
session.SendMsg(string(this.GetType()), "taskcomplete", resp) session.SendMsg(string(this.GetType()), "taskcomplete", resp)
@ -387,7 +387,7 @@ func (this *Caravan) TaskComplete(session comm.IUserSession, taskid ...int32) {
} }
session.SendMsg(string(this.GetType()), "taskcomplete", resp) session.SendMsg(string(this.GetType()), "taskcomplete", resp)
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.WriteUserLog(session.GetUserId(), 0, "TaskComplete", conf.Reword) this.WriteUserLog(session.GetUserId(), taskid, 0, "TaskComplete", conf.Reword)
}) })
} }
} }

View File

@ -75,7 +75,7 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.CatchbugsAwardReq)
session.SendMsg(string(this.module.GetType()), "award", &pb.CatchbugsAwardResp{Atype: req.Atype, Award: atno, Awardmap: awards}) session.SendMsg(string(this.module.GetType()), "award", &pb.CatchbugsAwardResp{Atype: req.Atype, Award: atno, Awardmap: awards})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CatchbugsAwardReq", atno) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "CatchbugsAwardReq", atno)
}) })
return return
} }

View File

@ -153,7 +153,7 @@ func (this *apiComp) Ask(session comm.IUserSession, req *pb.CombatAskReq) (errda
session.SendMsg(string(this.module.GetType()), "ask", &pb.CombatAskResp{Level: pitem}) session.SendMsg(string(this.module.GetType()), "ask", &pb.CombatAskResp{Level: pitem})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CombatAskReq", reward) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "CombatAskReq", reward)
}) })
return return
} }

View File

@ -101,7 +101,7 @@ func (this *apiComp) ChallengeReceive(session comm.IUserSession, req *pb.CombatC
} }
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CombatChallengeReceiveReq", atns) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "CombatChallengeReceiveReq", atns)
}) })
} }
session.SendMsg(string(this.module.GetType()), "challengereceive", &pb.CombatChallengeReceiveResp{Level: req.Level, Manster: req.Manster, Atns: atns}) session.SendMsg(string(this.module.GetType()), "challengereceive", &pb.CombatChallengeReceiveResp{Level: req.Level, Manster: req.Manster, Atns: atns})

View File

@ -114,7 +114,7 @@ func (this *apiComp) Drop(session comm.IUserSession, req *pb.CombatDropReq) (err
session.SendMsg(string(this.module.GetType()), "drop", &pb.CombatDropResp{Level: req.Level, Atns: atns}) session.SendMsg(string(this.module.GetType()), "drop", &pb.CombatDropResp{Level: req.Level, Atns: atns})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "CombatDropReq", atns) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "CombatDropReq", atns)
}) })
return return
} }

View File

@ -58,7 +58,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.DailytaskReceive
session.SendMsg(string(this.module.GetType()), "receive", &pb.DailytaskReceiveResp{Award: atno}) session.SendMsg(string(this.module.GetType()), "receive", &pb.DailytaskReceiveResp{Award: atno})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "DailytaskReceiveReq", atno) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "DailytaskReceiveReq", atno)
}) })
return return
} }

View File

@ -81,7 +81,7 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.DColorAwardReq) (e
session.SendMsg(string(this.module.GetType()), "award", &pb.DColorAwardResp{Atype: req.Atype, Award: atno, Awardmap: awards}) session.SendMsg(string(this.module.GetType()), "award", &pb.DColorAwardResp{Atype: req.Atype, Award: atno, Awardmap: awards})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "DColorAwardReq", atno) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "DColorAwardReq", atno)
}) })
return return
} }

View File

@ -71,7 +71,7 @@ func (a *apiComp) Autoreceive(session comm.IUserSession, req *pb.DispatchAutoRec
session.SendMsg(string(a.module.GetType()), "autoreceive", rsp) session.SendMsg(string(a.module.GetType()), "autoreceive", rsp)
go a.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go a.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
a.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "DispatchAutoReceiveReq", res) a.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "DispatchAutoReceiveReq", res)
}) })
return return
} }

View File

@ -122,7 +122,7 @@ func (this *apiComp) Do(session comm.IUserSession, req *pb.DispatchDoReq) (errda
} }
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype186, 1)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype186, 1))
this.module.ModuleBuried.TriggerBuried(session, tasks...) this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "DispatchDoReq", ticketAtn) // 消耗资源 this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "DispatchDoReq", ticketAtn) // 消耗资源
}) })
return return
} }

View File

@ -69,7 +69,7 @@ func (a *apiComp) Notice(session comm.IUserSession, req *pb.DispatchNoticeReq) (
a.module.DispenseRes(session, []*cfg.Gameatn{atn}, true) a.module.DispenseRes(session, []*cfg.Gameatn{atn}, true)
go a.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go a.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
a.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "恢复门票", atn) a.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "恢复门票", atn)
}) })
} }
} }

View File

@ -94,7 +94,7 @@ func (a *apiComp) Receive(session comm.IUserSession, req *pb.DispatchReceiveReq)
session.SendMsg(string(a.module.GetType()), "receive", rsp) session.SendMsg(string(a.module.GetType()), "receive", rsp)
go a.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go a.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
a.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "DispatchReceiveReq", res) a.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "DispatchReceiveReq", res)
}) })
return return
} }

View File

@ -103,7 +103,7 @@ func (this *apiComp) Refresh(session comm.IUserSession, req *pb.DispatchRefreshR
if len(need) > 0 { if len(need) > 0 {
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "DispatchRefreshReq", need) // 消耗资源 this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "DispatchRefreshReq", need) // 消耗资源
}) })
} }
return return

View File

@ -59,7 +59,7 @@ func (a *apiComp) Weekrecive(session comm.IUserSession, req *pb.DispatchWeekReci
if len(res) > 0 { if len(res) > 0 {
a.module.DispenseRes(session, res, true) a.module.DispenseRes(session, res, true)
go a.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go a.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
a.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "DispatchWeekReciveReq", res) a.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "DispatchWeekReciveReq", res)
}) })
} }
session.SendMsg(string(a.module.GetType()), "weekrecive", rsp) session.SendMsg(string(a.module.GetType()), "weekrecive", rsp)

View File

@ -97,7 +97,7 @@ func (this *apiComp) LvItem(session comm.IUserSession, req *pb.DragonLvItemReq)
session.SendMsg(string(this.module.GetType()), "lvitem", rsp) session.SendMsg(string(this.module.GetType()), "lvitem", rsp)
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "DragonLvItemReq", curLvConf.Item) // 消耗资源 this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "DragonLvItemReq", curLvConf.Item) // 消耗资源
}) })
return return
} }

View File

@ -170,8 +170,8 @@ func (this *apiComp) Train(session comm.IUserSession, req *pb.DragonTrainReq) (e
if curLv > preLv { // 升级后统计任务 if curLv > preLv { // 升级后统计任务
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype235, dragon.Lv, utils.ToInt32(dragon.Dragonid))) this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype235, dragon.Lv, utils.ToInt32(dragon.Dragonid)))
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "DragonTrainReq", atno) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "DragonTrainReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "DragonTrainReq", playConf.Deplete) // 消耗资源 this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "DragonTrainReq", playConf.Deplete) // 消耗资源
}) })
} }
return return

View File

@ -58,7 +58,7 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.EgghuntAwardReq) (
session.SendMsg(string(this.module.GetType()), "award", &pb.EgghuntAwardResp{Id: req.Id, Award: atno}) session.SendMsg(string(this.module.GetType()), "award", &pb.EgghuntAwardResp{Id: req.Id, Award: atno})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "EgghuntAwardReq", atno) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "EgghuntAwardReq", atno)
}) })
return return
} }

View File

@ -64,7 +64,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha
} }
session.SendMsg(string(this.module.GetType()), EnchantChallengeOverResp, &pb.EnchantChallengeOverResp{Data: enchant}) session.SendMsg(string(this.module.GetType()), EnchantChallengeOverResp, &pb.EnchantChallengeOverResp{Data: enchant})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "EnchantChallengeOverReq", cfgEnchant[0].PsMg) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "EnchantChallengeOverReq", cfgEnchant[0].PsMg)
}) })
return return
} }
@ -72,7 +72,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha
return return
} }
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "EnchantChallengeOverReq", cfgEnchant[0].PsConsume) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "EnchantChallengeOverReq", cfgEnchant[0].PsConsume)
}) })
userinfo, err := this.module.ModuleUser.GetUser(session.GetUserId()) userinfo, err := this.module.ModuleUser.GetUser(session.GetUserId())
if err != nil { if err != nil {
@ -106,7 +106,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha
return return
} }
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "EnchantChallengeOverReq", res) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "EnchantChallengeOverReq", res)
}) })
} }

View File

@ -88,7 +88,7 @@ func (this *apiComp) BoxReward(session comm.IUserSession, req *pb.EntertainBoxRe
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "EntertainBoxRewardReq", atno) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "EntertainBoxRewardReq", atno)
}) })
return return
} }

View File

@ -52,7 +52,7 @@ func (this *apiComp) CreateRoom(session comm.IUserSession, req *pb.EntertainCrea
return return
} }
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "EntertainCreateRoomReq", conf.Consume) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "EntertainCreateRoomReq", conf.Consume)
}) })
list.Card[req.Idcard] += 1 list.Card[req.Idcard] += 1
this.module.model.modifyEntertainmList(session.GetUserId(), map[string]interface{}{ this.module.model.modifyEntertainmList(session.GetUserId(), map[string]interface{}{

View File

@ -66,7 +66,7 @@ func (this *apiComp) Reward(session comm.IUserSession, req *pb.EntertainRewardRe
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(),0, "EntertainRewardReq", atno) this.module.WriteUserLog(session.GetUserId(), req, 0, "EntertainRewardReq", atno)
}) })
return return
} }

View File

@ -50,7 +50,7 @@ func (this *apiComp) JoinRoom(session comm.IUserSession, req *pb.EntertainJoinRo
return return
} }
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "EntertainJoinRoomReq", conf.Consume) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "EntertainJoinRoomReq", conf.Consume)
}) })
list.Card[req.Idcard] += 1 list.Card[req.Idcard] += 1
this.module.model.modifyEntertainmList(session.GetUserId(), map[string]interface{}{ this.module.model.modifyEntertainmList(session.GetUserId(), map[string]interface{}{

View File

@ -50,7 +50,7 @@ func (this *apiComp) Match(session comm.IUserSession, req *pb.EntertainMatchReq)
return return
} }
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "EntertainMatchReq", conf.Consume) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "EntertainMatchReq", conf.Consume)
}) })
list.Card[req.Idcard] += 1 list.Card[req.Idcard] += 1
this.module.model.modifyEntertainmList(session.GetUserId(), map[string]interface{}{ this.module.model.modifyEntertainmList(session.GetUserId(), map[string]interface{}{

View File

@ -538,7 +538,7 @@ func (this *Room) GameOver() (errdata *pb.ErrorData) {
if errdata, atno = this.module.DispenseAtno(this.szSession[winindex], res, true); errdata != nil { if errdata, atno = this.module.DispenseAtno(this.szSession[winindex], res, true); errdata != nil {
return return
} }
go this.module.WriteUserLog(winner.Userinfo.Uid, comm.GMResAddType, "xxlGameReward", atno) go this.module.WriteUserLog(winner.Userinfo.Uid, "GameOver", comm.GMResAddType, "xxlGameReward", atno)
this.szSession[winindex].Push() this.szSession[winindex].Push()
} }

View File

@ -116,7 +116,7 @@ func (this *apiComp) Ench(session comm.IUserSession, req *pb.EquipmentEnchReq) (
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype94, 1)) this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype94, 1))
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "EquipmentEnchReq", need) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "EquipmentEnchReq", need)
}) })
return return

View File

@ -75,7 +75,7 @@ func (this *apiComp) Forg(session comm.IUserSession, req *pb.EquipmentForgReq) (
session.SendMsg(string(this.module.GetType()), "forg", &pb.EquipmentForgResp{Issucc: true, Reward: reward}) session.SendMsg(string(this.module.GetType()), "forg", &pb.EquipmentForgResp{Issucc: true, Reward: reward})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "EquipmentForgReq", need) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "EquipmentForgReq", need)
}) })
return return
} }

View File

@ -110,7 +110,7 @@ func (this *apiComp) Sell(session comm.IUserSession, req *pb.EquipmentSellReq) (
} }
session.SendMsg(string(this.module.GetType()), "sell", &pb.EquipmentSellResp{IsSucc: true, Reward: reward}) session.SendMsg(string(this.module.GetType()), "sell", &pb.EquipmentSellResp{IsSucc: true, Reward: reward})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "EquipmentSellReq", reward) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "EquipmentSellReq", reward)
}) })
return return
} }

View File

@ -293,7 +293,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...) this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "EquipmentUpgradeReq", intensify.Need) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "EquipmentUpgradeReq", intensify.Need)
}) })
return return
} }

View File

@ -83,7 +83,7 @@ func (this *apiComp) Wash(session comm.IUserSession, req *pb.EquipmentWashReq) (
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype95, 1)) this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype95, 1))
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "EquipmentWashReq", &cfg.Gameatn{A: comm.AttrType, T: comm.ResGold, N: gole}) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "EquipmentWashReq", &cfg.Gameatn{A: comm.AttrType, T: comm.ResGold, N: gole})
}) })
return return
} }

View File

@ -418,7 +418,7 @@ func (this *Equipment) SellEquipments(session comm.IUserSession, equs []string)
} }
go func() { go func() {
this.WriteUserLog(session.GetUserId(), 0, "SellEquipments", atno) this.WriteUserLog(session.GetUserId(), equs, 0, "SellEquipments", atno)
}() }()
return return
} }
@ -515,7 +515,7 @@ func (this *Equipment) RecycleEquipments(session comm.IUserSession, equs []strin
return return
} }
go func() { go func() {
this.WriteUserLog(session.GetUserId(), 0, "RecycleEquipments", atno) this.WriteUserLog(session.GetUserId(), equs, 0, "RecycleEquipments", atno)
}() }()
return return
} }

View File

@ -61,7 +61,7 @@ func (this *apiComp) Getreward(session comm.IUserSession, req *pb.FriendGetrewar
session.SendMsg(string(this.module.GetType()), "getreward", rsp) session.SendMsg(string(this.module.GetType()), "getreward", rsp)
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "FriendGetrewardReq", globalConf.FriendPeize) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "FriendGetrewardReq", globalConf.FriendPeize)
}) })
return return
} }

View File

@ -133,7 +133,7 @@ func (this *apiComp) Zan(session comm.IUserSession, req *pb.FriendZanReq) (errda
// 赠送X次友情点 // 赠送X次友情点
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype11, 1)) this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype11, 1))
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "FriendGetrewardReq", res) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "FriendGetrewardReq", res)
}) })
return return
} }

View File

@ -62,7 +62,7 @@ func (this *apiComp) ActivateAtlas(session comm.IUserSession, req *pb.GourmetAct
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "GourmetActivateAtlasReq", conf.Unlockreward) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "GourmetActivateAtlasReq", conf.Unlockreward)
}) })
return return
} }

View File

@ -100,8 +100,8 @@ func (this *apiComp) CreateFood(session comm.IUserSession, req *pb.GourmetCreate
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype150, 1)) this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype150, 1))
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "GourmetCreateFoodReq", atn) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "GourmetCreateFoodReq", atn)
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "GourmetCreateFoodReq", res) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "GourmetCreateFoodReq", res)
}) })
return return
} }

View File

@ -116,7 +116,7 @@ func (this *apiComp) Advreceive(session comm.IUserSession, req *pb.GrowtaskAdvRe
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "GrowtaskAdvReceiveReq", atno) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "GrowtaskAdvReceiveReq", atno)
}) })
return return
} }

View File

@ -77,7 +77,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.GrowtaskReceiveR
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "GrowtaskReceiveReq", reward) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "GrowtaskReceiveReq", reward)
}) })
return return
} }

View File

@ -206,7 +206,7 @@ func (this *apiComp) ChallengeFinish(session comm.IUserSession, req *pb.GuildGve
Boosticket: member.Boosticket, Boosticket: member.Boosticket,
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "GuildGveChallengeFinishReq", award) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "GuildGveChallengeFinishReq", award)
}) })
return return
} }

View File

@ -73,8 +73,8 @@ func (this *apiComp) Roulette(session comm.IUserSession, req *pb.GuildGveRoulett
session.SendMsg(string(this.module.GetType()), "roulette", &pb.GuildGveRouletteResp{Cid: confs[index].Id, Award: award}) session.SendMsg(string(this.module.GetType()), "roulette", &pb.GuildGveRouletteResp{Cid: confs[index].Id, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "GuildGveRouletteReq", confs[index].Reward) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "GuildGveRouletteReq", confs[index].Reward)
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "GuildGveRouletteReq", need) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "GuildGveRouletteReq", need)
}) })
return return
} }

View File

@ -148,7 +148,7 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (e
} }
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...) this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "HeroAwakenReq", awakenData.Phaseneed) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "HeroAwakenReq", awakenData.Phaseneed)
}) })
return return
} }

View File

@ -330,12 +330,12 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
// 任务统计 // 任务统计
this.module.SendTaskMsg(session, szStar, req.DrawCount, req.DrawType, szCards) this.module.SendTaskMsg(session, szStar, req.DrawCount, req.DrawType, szCards)
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "HeroDrawCardReq", atno) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "HeroDrawCardReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "HeroDrawCardReq", costRes) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "HeroDrawCardReq", costRes)
}) })
} else { } else {
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "HeroDrawCardReq", costRes) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "HeroDrawCardReq", costRes)
}) })
} }
@ -420,8 +420,8 @@ func (this *apiComp) wishDrawCard(session comm.IUserSession, heroRecord *pb.DBHe
rsp.Record = heroRecord rsp.Record = heroRecord
session.SendMsg(string(this.module.GetType()), DrawCard, rsp) session.SendMsg(string(this.module.GetType()), DrawCard, rsp)
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "HeroDrawCardReq", atno) this.module.WriteUserLog(session.GetUserId(), heroRecord.WishHero, comm.GMResAddType, "HeroDrawCardReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "HeroDrawCardReq", costRes) this.module.WriteUserLog(session.GetUserId(), heroRecord.WishHero, comm.GMResDelType, "HeroDrawCardReq", costRes)
}) })
return return
} }

View File

@ -100,7 +100,7 @@ func (this *apiComp) PeachReward(session comm.IUserSession, req *pb.HeroPeachRew
session.SendMsg(string(this.module.GetType()), HeroPeachRewardReq, rsp) session.SendMsg(string(this.module.GetType()), HeroPeachRewardReq, rsp)
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "HeroPeachRewardReq", reward) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "HeroPeachRewardReq", reward)
}) })
return return
} }

View File

@ -155,7 +155,7 @@ func (this *apiComp) StrengthenUpSkill(session comm.IUserSession, req *pb.HeroSt
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype117, lvUpCount, utils.ToInt32(_hero.HeroID))) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype117, lvUpCount, utils.ToInt32(_hero.HeroID)))
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...) this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "HeroStrengthenUpSkillReq", cost) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "HeroStrengthenUpSkillReq", cost)
}) })
return return
} }

View File

@ -117,9 +117,9 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...) this.module.ModuleBuried.TriggerBuried(session, tasks...)
if len(starConf.Starup) > 0 { if len(starConf.Starup) > 0 {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "HeroStrengthenUpStarReq", starConf.Starup) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "HeroStrengthenUpStarReq", starConf.Starup)
} }
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "HeroStrengthenUpStarReq", starConf.Needrace) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "HeroStrengthenUpStarReq", starConf.Needrace)
}) })
return return
} }

View File

@ -103,7 +103,7 @@ func (this *apiComp) StrengthenUplv(session comm.IUserSession, req *pb.HeroStren
session.SendMsg(string(this.module.GetType()), StrengthenUplv, &pb.HeroStrengthenUplvResp{Hero: _hero}) session.SendMsg(string(this.module.GetType()), StrengthenUplv, &pb.HeroStrengthenUplvResp{Hero: _hero})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "HeroStrengthenUplvReq", cost) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "HeroStrengthenUplvReq", cost)
}) })
return return
} }

View File

@ -220,7 +220,7 @@ func (this *apiComp) TalentLearn(session comm.IUserSession, req *pb.HeroTalentLe
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype199, 1)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype199, 1))
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...) this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "HeroTalentLearnReq", res) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "HeroTalentLearnReq", res)
}) })
} }

View File

@ -73,7 +73,7 @@ func (this *apiComp) TalentReset(session comm.IUserSession, req *pb.HeroTalentRe
this.module.Errorf("DispenseRes err,uid:%s,item:%v", session.GetUserId(), res) this.module.Errorf("DispenseRes err,uid:%s,item:%v", session.GetUserId(), res)
} // 返还升级的天赋点数 } // 返还升级的天赋点数
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "HeroTalentResetReq", res) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "HeroTalentResetReq", res)
}) })
} }
@ -100,7 +100,7 @@ func (this *apiComp) TalentReset(session comm.IUserSession, req *pb.HeroTalentRe
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "HeroTalentResetReq", this.module.ModuleTools.GetGlobalConf().TalentReset) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "HeroTalentResetReq", this.module.ModuleTools.GetGlobalConf().TalentReset)
}) })
return return
} }

View File

@ -824,7 +824,7 @@ func (this *ModelHero) createHero(session comm.IUserSession, heroCfgId string, c
if len(res) > 0 { // 资源统一发放 if len(res) > 0 { // 资源统一发放
this.module.DispenseRes(session, res, true) this.module.DispenseRes(session, res, true)
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "create hero", res) this.module.WriteUserLog(session.GetUserId(), heroCfgId, comm.GMResAddType, "create hero", res)
}) })
} }
return return
@ -910,7 +910,7 @@ func (this *ModelHero) GetDrawCardReward(session comm.IUserSession, szCards []st
rsp = append(rsp, &pb.AtnoData{Atno: atno}) rsp = append(rsp, &pb.AtnoData{Atno: atno})
} }
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "GetDrawCardReward", rsp) this.module.WriteUserLog(session.GetUserId(), szCards, comm.GMResAddType, "GetDrawCardReward", rsp)
}) })
return return
} }

View File

@ -108,7 +108,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.HeroTaskReceiveR
} }
session.SendMsg(string(this.module.GetType()), "receive", &pb.HeroTaskReceiveResp{Hero: req.Hero, Stage: req.Stage, Award: award}) session.SendMsg(string(this.module.GetType()), "receive", &pb.HeroTaskReceiveResp{Hero: req.Hero, Stage: req.Stage, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "HeroTaskReceiveReq", award) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "HeroTaskReceiveReq", award)
}) })
return return

View File

@ -71,8 +71,8 @@ func (this *apiComp) Reset(session comm.IUserSession, req *pb.HoroscopeResetReq)
} }
session.SendMsg(string(this.module.GetType()), "reset", &pb.HoroscopeResetResp{Issucc: true, Info: info, Award: consume}) session.SendMsg(string(this.module.GetType()), "reset", &pb.HoroscopeResetResp{Issucc: true, Info: info, Award: consume})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "HoroscopeResetReq", res) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "HoroscopeResetReq", res)
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "HoroscopeResetReq", conf.HoroscopeResetCost) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "HoroscopeResetReq", conf.HoroscopeResetCost)
}) })
return return

View File

@ -108,7 +108,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.HoroscopeUpgrade
if len(tasks) > 0 { if len(tasks) > 0 {
this.module.ModuleBuried.TriggerBuried(session, tasks...) this.module.ModuleBuried.TriggerBuried(session, tasks...)
} }
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "HoroscopeUpgradeReq", conf.CostItem) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "HoroscopeUpgradeReq", conf.CostItem)
}) })
return return

View File

@ -133,7 +133,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.HuntingChallen
} }
if ps > 0 { if ps > 0 {
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "HuntingChallengeReq", &cfg.Gameatn{ this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "HuntingChallengeReq", &cfg.Gameatn{
A: "attr", A: "attr",
T: "ps", T: "ps",
N: ps, N: ps,

View File

@ -204,7 +204,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype200, 1)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype200, 1))
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...) this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "HuntingChallengeOverReq", szAtno) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "HuntingChallengeOverReq", szAtno)
}) })
return return
} }

View File

@ -96,7 +96,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.IntegralCh
return return
} }
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "IntegralChallengeOverReq", res) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "IntegralChallengeOverReq", res)
}) })
} }

View File

@ -116,7 +116,7 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.IsLandBuyReq) (errda
session.SendMsg(string(this.module.GetType()), "buy", &pb.IsLandBuyResp{Hero: hero}) session.SendMsg(string(this.module.GetType()), "buy", &pb.IsLandBuyResp{Hero: hero})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "IsLandBuyReq", coinconf.Need) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "IsLandBuyReq", coinconf.Need)
}) })
return return
} }

View File

@ -110,7 +110,7 @@ func (this *apiComp) Complete(session comm.IUserSession, req *pb.IsLandCompleteR
session.SendMsg(string(this.module.GetType()), "complete", &pb.IsLandCompleteResp{Level: req.Level, Award: award}) session.SendMsg(string(this.module.GetType()), "complete", &pb.IsLandCompleteResp{Level: req.Level, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "IsLandCompleteReq", award) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "IsLandCompleteReq", award)
}) })
return return
} }

View File

@ -70,7 +70,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.IsLandReceiveReq
session.SendMsg(string(this.module.GetType()), "receive", &pb.IsLandReceiveResp{Info: info, Award: award}) session.SendMsg(string(this.module.GetType()), "receive", &pb.IsLandReceiveResp{Info: info, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "IsLandReceiveReq", award) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "IsLandReceiveReq", award)
}) })
return return
} }

View File

@ -77,7 +77,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.IsLandUpgradeReq
}) })
session.SendMsg(string(this.module.GetType()), "upgrade", &pb.IsLandUpgradeResp{Nid: conf.NodeId, Lv: info.Nodes[conf.NodeId]}) session.SendMsg(string(this.module.GetType()), "upgrade", &pb.IsLandUpgradeResp{Nid: conf.NodeId, Lv: info.Nodes[conf.NodeId]})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "IsLandUpgradeReq", conf.CostItem) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "IsLandUpgradeReq", conf.CostItem)
}) })
return return
} }

View File

@ -109,8 +109,8 @@ func (this *apiComp) BuyPhysical(session comm.IUserSession, req *pb.ItemsBuyPhys
}) })
session.SendMsg(string(this.module.GetType()), "buyphysical", &pb.ItemsBuyPhysicalResp{Issucc: true, PhysicalBuyNum: user.Physicalbuynum, Asets: atno}) session.SendMsg(string(this.module.GetType()), "buyphysical", &pb.ItemsBuyPhysicalResp{Issucc: true, PhysicalBuyNum: user.Physicalbuynum, Asets: atno})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "ItemsBuyPhysicalReq", atno) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "ItemsBuyPhysicalReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "ItemsBuyPhysicalReq", need) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "ItemsBuyPhysicalReq", need)
}) })
return return
} }

View File

@ -81,7 +81,7 @@ func (this *apiComp) Decompose(session comm.IUserSession, req *pb.ItemsDecompose
session.SendMsg(string(this.module.GetType()), "decompose", &pb.ItemsDecomposeResp{GridId: req.GridId, Amount: req.Amount, Issucc: true, Asets: atno}) session.SendMsg(string(this.module.GetType()), "decompose", &pb.ItemsDecomposeResp{GridId: req.GridId, Amount: req.Amount, Issucc: true, Asets: atno})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "ItemsDecomposeReq", atno) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "ItemsDecomposeReq", atno)
}) })
return return
} }

View File

@ -71,7 +71,7 @@ func (this *apiComp) PotionSynthesis(session comm.IUserSession, req *pb.ItemsPot
session.SendMsg(string(this.module.GetType()), "potionsynthesis", &pb.ItemsPotionSynthesisResp{Succ: true, Id: req.Id, Num: req.Num}) session.SendMsg(string(this.module.GetType()), "potionsynthesis", &pb.ItemsPotionSynthesisResp{Succ: true, Id: req.Id, Num: req.Num})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "ItemsPotionSynthesisReq", give) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "ItemsPotionSynthesisReq", give)
}) })
return return

View File

@ -73,7 +73,7 @@ func (this *apiComp) SellItem(session comm.IUserSession, req *pb.ItemsSellItemRe
} }
session.SendMsg(string(this.module.GetType()), "sellitem", &pb.ItemsSellItemResp{GridId: req.GridId, Amount: req.Amount, Issucc: true, Asets: atno}) session.SendMsg(string(this.module.GetType()), "sellitem", &pb.ItemsSellItemResp{GridId: req.GridId, Amount: req.Amount, Issucc: true, Asets: atno})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "ItemsSellItemReq", atno) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "ItemsSellItemReq", atno)
}) })
return return
} }

View File

@ -88,7 +88,7 @@ func (this *apiComp) Sellinbulk(session comm.IUserSession, req *pb.ItemsSellinbu
session.SendMsg(string(this.module.GetType()), "sellitem", &pb.ItemsSellinbulkResp{Grids: req.Grids, Amount: req.Amount, Issucc: issucc}) session.SendMsg(string(this.module.GetType()), "sellitem", &pb.ItemsSellinbulkResp{Grids: req.Grids, Amount: req.Amount, Issucc: issucc})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "ItemsSellinbulkReq", sale) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "ItemsSellinbulkReq", sale)
}) })
return return
} }

View File

@ -546,8 +546,8 @@ func (this *ModelItemsComp) buyTicket(session comm.IUserSession, buy int32) (inf
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "buyTicket", res) this.module.WriteUserLog(session.GetUserId(), buy, comm.GMResAddType, "buyTicket", res)
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "buyTicket", needs) this.module.WriteUserLog(session.GetUserId(), buy, comm.GMResDelType, "buyTicket", needs)
}) })
return return
} }
@ -605,7 +605,7 @@ func (this *ModelItemsComp) recoverTicket(session comm.IUserSession) (errdata *p
this.module.DispenseRes(session, []*cfg.Gameatn{{A: ticketitem.A, T: ticketitem.T, N: ticketNum}}, true) this.module.DispenseRes(session, []*cfg.Gameatn{{A: ticketitem.A, T: ticketitem.T, N: ticketNum}}, true)
info.Recovertimeunifiedticket = time.Unix(info.Recovertimeunifiedticket, 0).Add(time.Duration(ticketNum) * time.Minute).Unix() info.Recovertimeunifiedticket = time.Unix(info.Recovertimeunifiedticket, 0).Add(time.Duration(ticketNum) * time.Minute).Unix()
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "recoverTicket", []*cfg.Gameatn{{A: ticketitem.A, T: ticketitem.T, N: ticketNum}}) this.module.WriteUserLog(session.GetUserId(), "", comm.GMResAddType, "recoverTicket", []*cfg.Gameatn{{A: ticketitem.A, T: ticketitem.T, N: ticketNum}})
}) })
} }
} }
@ -669,7 +669,7 @@ func (this *ModelItemsComp) useitem(session comm.IUserSession, gid string, amoun
return return
} }
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "itemuse_exchange", sale) this.module.WriteUserLog(session.GetUserId(), slt, comm.GMResDelType, "itemuse_exchange", sale)
}) })
if errdata = this.module.AddItemforGrid(session, gid, -1*itemcf.SynthetizeNum*int32(amount), true); errdata != nil { if errdata = this.module.AddItemforGrid(session, gid, -1*itemcf.SynthetizeNum*int32(amount), true); errdata != nil {
return return
@ -715,7 +715,7 @@ func (this *ModelItemsComp) useitem(session comm.IUserSession, gid string, amoun
return return
} }
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "itemuse_heroexchange", sale) this.module.WriteUserLog(session.GetUserId(), slt, comm.GMResDelType, "itemuse_heroexchange", sale)
}) })
if errdata = this.module.AddItemforGrid(session, gid, -1*int32(amount), true); errdata != nil { if errdata = this.module.AddItemforGrid(session, gid, -1*int32(amount), true); errdata != nil {
return return
@ -834,7 +834,7 @@ func (this *ModelItemsComp) useitem(session comm.IUserSession, gid string, amoun
} }
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "useitem", atno) this.module.WriteUserLog(session.GetUserId(), itemcf.Usetype, comm.GMResAddType, "useitem", atno)
}) })
return return
} }

View File

@ -365,7 +365,7 @@ func (this *Items) SellItem(session comm.IUserSession, items map[string]int32, b
this.itemsChangePush(session, change) //推送道具背包变化 this.itemsChangePush(session, change) //推送道具背包变化
} }
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.WriteUserLog(session.GetUserId(), 0, "SellItem", atno) this.WriteUserLog(session.GetUserId(), "", 0, "SellItem", atno)
}) })
return return
} }

View File

@ -91,7 +91,7 @@ func (this *apiComp) Reward(session comm.IUserSession, req *pb.JielongRewardReq)
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "JielongRewardReq", atno) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "JielongRewardReq", atno)
}) })
return return
} }

View File

@ -50,7 +50,7 @@ func (this *apiComp) StartGame(session comm.IUserSession, req *pb.JielongStartGa
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "JielongStartGameReq", jielongItem) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "JielongStartGameReq", jielongItem)
}) })
return return
} }

View File

@ -104,7 +104,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.KFTaskReceiveReq
}) })
session.SendMsg(string(this.module.GetType()), "receive", &pb.KFTaskReceiveResp{Id: req.Id, Award: award}) session.SendMsg(string(this.module.GetType()), "receive", &pb.KFTaskReceiveResp{Id: req.Id, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "KFTaskReceiveReq", award) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "KFTaskReceiveReq", award)
}) })
return return

View File

@ -108,7 +108,7 @@ func (this *apiComp) GetStoryReward(session comm.IUserSession, req *pb.LibraryGe
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "LibraryGetStoryRewardReq", atno) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "LibraryGetStoryRewardReq", atno)
}) })
return return
} }

View File

@ -73,7 +73,7 @@ func (this *apiComp) LvReward(session comm.IUserSession, req *pb.LibraryLvReward
Reward: atno, Reward: atno,
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "LibraryLvRewardReq", atno) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "LibraryLvRewardReq", atno)
}) })
return return
} }

View File

@ -201,7 +201,7 @@ func (this *apiComp) UseGift(session comm.IUserSession, req *pb.LibraryUseGiftRe
if len(tasks) > 0 { if len(tasks) > 0 {
this.module.ModuleBuried.TriggerBuried(session, tasks...) this.module.ModuleBuried.TriggerBuried(session, tasks...)
} }
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "LibraryUseGiftReq", res) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "LibraryUseGiftReq", res)
}) })
return return

View File

@ -69,7 +69,7 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.LinestoryReceive
} }
session.SendMsg(string(this.module.GetType()), LinestorySubTypeReceive, rsp) session.SendMsg(string(this.module.GetType()), LinestorySubTypeReceive, rsp)
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "LinestoryReceiveReq", conf.Reward) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "LinestoryReceiveReq", conf.Reward)
}) })
return return
} }

View File

@ -61,7 +61,7 @@ func (this *apiComp) GetUserMailAttachment(session comm.IUserSession, req *pb.Ma
session.SendMsg(string(this.module.GetType()), "getusermailattachment", &pb.MailGetUserMailAttachmentResp{Mail: mail}) session.SendMsg(string(this.module.GetType()), "getusermailattachment", &pb.MailGetUserMailAttachmentResp{Mail: mail})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MailGetUserMailAttachmentReq", res) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "MailGetUserMailAttachmentReq", res)
}) })
return return
} }
@ -124,7 +124,7 @@ func (this *apiComp) GetAllMailAttachment(session comm.IUserSession, req *pb.Mai
Ids: mailIds, Ids: mailIds,
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MailGetAllMailAttachmentReq", atno) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "MailGetAllMailAttachmentReq", atno)
}) })
return return
} }

View File

@ -88,7 +88,7 @@ func (this *apiComp) BoosChallengeOver(session comm.IUserSession, req *pb.Mainli
Reward: aeward, Reward: aeward,
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MainlineBoosChallengeOverReq", aeward) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "MainlineBoosChallengeOverReq", aeward)
}) })
return return
} }

View File

@ -104,7 +104,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChalle
}) })
if ps > 0 { if ps > 0 {
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "MainlineChallengeReq", psAnt) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "MainlineChallengeReq", psAnt)
}) })
} }
return return

View File

@ -82,7 +82,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MainlineCh
}) // 数据推送 }) // 数据推送
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MainlineChallengeOverReq false", conf.PsConsume) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "MainlineChallengeOverReq false", conf.PsConsume)
}) })
return return
} }
@ -204,7 +204,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MainlineCh
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...) this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.ModuleSys.CheckOpenCond(session, comm.OpencondTypeMaxmapid, req.Level) this.module.ModuleSys.CheckOpenCond(session, comm.OpencondTypeMaxmapid, req.Level)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MainlineChallengeOverReq", reward) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "MainlineChallengeOverReq", reward)
}) })
return return
} }

View File

@ -145,7 +145,7 @@ func (this *apiComp) LevelPass(session comm.IUserSession, req *pb.MainlineLevelP
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...) this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.ModuleSys.CheckOpenCond(session, comm.OpencondTypeMaxmapid, req.Level) this.module.ModuleSys.CheckOpenCond(session, comm.OpencondTypeMaxmapid, req.Level)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MainlineLevelPassReq", aeward) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "MainlineLevelPassReq", aeward)
}) })
return return
} }

View File

@ -156,7 +156,7 @@ func (this *apiComp) ReceiveAward(session comm.IUserSession, req *pb.MainlineRec
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MainlineReceiveAwardReq", reward) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "MainlineReceiveAwardReq", reward)
}) })
return return
} }

View File

@ -92,8 +92,8 @@ func (this *apiComp) ShopBuy(session comm.IUserSession, req *pb.MainlineShopBuyR
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...) this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MainlineShopBuyReq", atno) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "MainlineShopBuyReq", atno)
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "MainlineShopBuyReq", shopConf.Need) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "MainlineShopBuyReq", shopConf.Need)
}) })
return return
} }

View File

@ -96,7 +96,7 @@ func (this *apiComp) TaskChapteReward(session comm.IUserSession, req *pb.Mainlin
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MainlineTaskChapteRewardReq", award) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "MainlineTaskChapteRewardReq", award)
}) })
return return
} }

View File

@ -78,7 +78,7 @@ func (this *apiComp) TaskReceive(session comm.IUserSession, req *pb.MainlineTask
session.SendMsg(string(this.module.GetType()), "taskreceive", &pb.MainlineTaskReceiveResp{Id: req.Id, Award: award}) session.SendMsg(string(this.module.GetType()), "taskreceive", &pb.MainlineTaskReceiveResp{Id: req.Id, Award: award})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "MainlineTaskReceiveReq", award) this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "MainlineTaskReceiveReq", award)
}) })
return return
} }

View File

@ -40,12 +40,13 @@ func (this *modelUserLog) Init(service core.IService, module core.IModule, comp
} }
// 用户操作明细数据记录 // 用户操作明细数据记录
func (this *modelUserLog) AddUserLog(uid string, itype int32, tag string, data interface{}) { func (this *modelUserLog) AddUserLog(uid string, req interface{}, itype int32, tag string, data interface{}) {
var ( var (
dbModel *db.DBModel dbModel *db.DBModel
err error err error
jsonStr []byte jsonStr []byte
logType string logType string
jsonReq []byte
) )
if data == nil { // 过滤空数据 if data == nil { // 过滤空数据
return return
@ -54,6 +55,13 @@ func (this *modelUserLog) AddUserLog(uid string, itype int32, tag string, data i
log.Errorln(err) log.Errorln(err)
return return
} }
if len(jsonStr) == 0 {
return
}
if jsonReq, err = json.Marshal(req); err != nil {
log.Errorln(err)
return
}
if itype == 0 { if itype == 0 {
logType = "add" // 新增资源类型 logType = "add" // 新增资源类型
} else if itype == 1 { } else if itype == 1 {
@ -74,6 +82,7 @@ func (this *modelUserLog) AddUserLog(uid string, itype int32, tag string, data i
Tag: tag, Tag: tag,
Data: string(jsonStr), Data: string(jsonStr),
Ctime: configure.Now().Unix(), Ctime: configure.Now().Unix(),
Req: string(jsonReq),
}); err != nil { }); err != nil {
log.Errorln(err) log.Errorln(err)
return return
@ -89,6 +98,7 @@ func (this *modelUserLog) AddUserLog(uid string, itype int32, tag string, data i
Tag: tag, Tag: tag,
Data: string(jsonStr), Data: string(jsonStr),
Ctime: configure.Now().Unix(), Ctime: configure.Now().Unix(),
Req: string(jsonReq),
}); err != nil { }); err != nil {
log.Errorln(err) log.Errorln(err)
return return

View File

@ -955,6 +955,6 @@ func (this *ModuleBase) AsynHandleSession(session comm.IUserSession, handle func
} }
//写用户日志 //写用户日志
func (this *ModuleBase) WriteUserLog(uid string, itype int32, tag string, data interface{}) { func (this *ModuleBase) WriteUserLog(uid string, req interface{}, itype int32, tag string, data interface{}) {
this.userlog.AddUserLog(uid, itype, tag, data) this.userlog.AddUserLog(uid, req, itype, tag, data)
} }

Some files were not shown because too many files have changed in this diff Show More