61 lines
1.3 KiB
Go
61 lines
1.3 KiB
Go
package buried
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/lego/base"
|
|
"go_dreamfactory/lego/core"
|
|
"go_dreamfactory/modules"
|
|
)
|
|
|
|
/*
|
|
模块名:用户埋点完成条件触发系统
|
|
模块描述:用户埋点数据中心管理模块
|
|
开发人员:李伟
|
|
*/
|
|
|
|
type Buried struct {
|
|
modules.ModuleBase
|
|
service base.IRPCXService
|
|
configure *configureComp
|
|
modelBuried *modelBuried
|
|
}
|
|
|
|
func NewModule() core.IModule {
|
|
return &Buried{}
|
|
}
|
|
|
|
func (this *Buried) GetType() core.M_Modules {
|
|
return comm.ModuleBuried
|
|
}
|
|
|
|
func (this *Buried) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
|
err = this.ModuleBase.Init(service, module, options)
|
|
this.service = service.(base.IRPCXService)
|
|
return
|
|
}
|
|
|
|
func (this *Buried) Start() (err error) {
|
|
err = this.ModuleBase.Start()
|
|
return
|
|
}
|
|
|
|
//装备组件
|
|
func (this *Buried) OnInstallComp() {
|
|
this.ModuleBase.OnInstallComp()
|
|
|
|
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
|
this.modelBuried = this.RegisterComp(new(modelBuried)).(*modelBuried)
|
|
}
|
|
|
|
//触发埋点
|
|
func (this *Buried) TriggerBuried(uid string, taskParams ...*comm.TaskParam) {
|
|
for _, buried := range taskParams {
|
|
conds := this.configure.getCondiDatas(buried.TT)
|
|
for _, cond := range conds {
|
|
if checkburied(buried, cond) { //判断此埋点数据是否有效
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|