补充日志
This commit is contained in:
parent
58e8c2f7fd
commit
7f7b549274
@ -7,6 +7,7 @@ import (
|
||||
"go_dreamfactory/lego/base"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/event"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/lego/utils/codec/json"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
@ -74,8 +75,9 @@ func (this *Chat) OnInstallComp() {
|
||||
|
||||
//Event------------------------------------------------------------------------------------------------------------
|
||||
func (this *Chat) EventUserOffline(session comm.IUserSession) {
|
||||
err := this.modelChat.RemoveCrossChannelMember(session)
|
||||
this.Debugf("EventUserOffline:%s err:%v", session, err)
|
||||
if err := this.modelChat.RemoveCrossChannelMember(session); err != nil {
|
||||
this.Debug("EventUserOffline:", log.Field{"uid", session.GetUserId()}, log.Field{"err", err})
|
||||
}
|
||||
}
|
||||
|
||||
//对外接口----------------------------------------------------------------------------------------------------------
|
||||
|
@ -195,12 +195,11 @@ func (this *ModuleRtask) initRtaskVerifyHandle() {
|
||||
}
|
||||
|
||||
func (this *ModuleRtask) SendToRtask(session comm.IUserSession, rtaskType comm.TaskType, params ...int32) (code pb.ErrorCode) {
|
||||
this.Debugf("receive Rtask %v params: %v", rtaskType, params)
|
||||
this.Debug("任务事件触发", log.Field{"uid", session.GetUserId()}, log.Field{"taskType", rtaskType}, log.Field{"params", params})
|
||||
var (
|
||||
err error
|
||||
condiId int32
|
||||
// condi *rtaskCondi
|
||||
condis []*rtaskCondi
|
||||
condis []*rtaskCondi
|
||||
)
|
||||
|
||||
user := this.ModuleUser.GetUser(session.GetUserId())
|
||||
@ -210,18 +209,24 @@ func (this *ModuleRtask) SendToRtask(session comm.IUserSession, rtaskType comm.T
|
||||
}
|
||||
|
||||
for _, codi := range this.configure.getRtaskCondis(int32(rtaskType)) {
|
||||
if v, ok := this.handleMap[codi.Id]; ok {
|
||||
if v.find == nil {
|
||||
return
|
||||
}
|
||||
if condiId, err = v.find(v.cfg, params...); condiId == 0 {
|
||||
if err != nil {
|
||||
this.Error(err.Error())
|
||||
}
|
||||
} else {
|
||||
condis = append(condis, v)
|
||||
}
|
||||
v, ok := this.handleMap[codi.Id]
|
||||
if !ok {
|
||||
this.Warn("未注册事件处理器", log.Field{"uid", session.GetUserId()}, log.Field{"condiId", codi.Id})
|
||||
code = pb.ErrorCode_RtaskCondiNoFound
|
||||
return
|
||||
}
|
||||
|
||||
if v.find == nil {
|
||||
return
|
||||
}
|
||||
if condiId, err = v.find(v.cfg, params...); condiId == 0 {
|
||||
if err != nil {
|
||||
this.Error(err.Error())
|
||||
}
|
||||
} else {
|
||||
condis = append(condis, v)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// update
|
||||
@ -233,7 +238,6 @@ func (this *ModuleRtask) SendToRtask(session comm.IUserSession, rtaskType comm.T
|
||||
code = pb.ErrorCode_DBError
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user