package notify import ( "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/modules" "go_dreamfactory/pb" "time" ) /* 模块名:公告系统 是否跨服:是 描述:提供运营后台发布全服公告 开发:李伟 */ func NewModule() core.IModule { m := new(Notify) return m } type Notify struct { modules.ModuleBase api_comp *apiComp modelNotify *modelNotifyComp } //模块名 func (this *Notify) GetType() core.M_Modules { return comm.ModuleNotify } //模块初始化接口 注册用户创建角色事件 func (this *Notify) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { if err = this.ModuleBase.Init(service, module, options); err != nil { return } return } //装备组件 func (this *Notify) OnInstallComp() { this.ModuleBase.OnInstallComp() this.api_comp = this.RegisterComp(new(apiComp)).(*apiComp) this.modelNotify = this.RegisterComp(new(modelNotifyComp)).(*modelNotifyComp) } //添加定时通知消息 func (this *Notify) AddTimerNotify(uid string, ntype comm.NotifyType, delay time.Duration) (errdata *pb.ErrorData) { return }