package pagoda import ( "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/modules" "go_dreamfactory/pb" ) type Pagoda struct { modules.ModuleBase modelPagoda *ModelPagoda api *apiComp configure *configureComp } func NewModule() core.IModule { return &Pagoda{} } func (this *Pagoda) GetType() core.M_Modules { return comm.ModulePagoda } func (this *Pagoda) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { err = this.ModuleBase.Init(service, module, options) return } func (this *Pagoda) OnInstallComp() { this.ModuleBase.OnInstallComp() this.api = this.RegisterComp(new(apiComp)).(*apiComp) this.modelPagoda = this.RegisterComp(new(ModelPagoda)).(*ModelPagoda) this.configure = this.RegisterComp(new(configureComp)).(*configureComp) } // 接口信息 func (this *Pagoda) ModifyPagodaData(uid string, objId string, data map[string]interface{}) (code pb.ErrorCode) { err := this.modelPagoda.modifyPagodaDataByObjId(uid, objId, data) if err != nil { code = pb.ErrorCode_DBError } return }