diff --git a/modules/catchbugs/model.go b/modules/catchbugs/model.go index ef1a4760e..10ae6f929 100644 --- a/modules/catchbugs/model.go +++ b/modules/catchbugs/model.go @@ -20,6 +20,7 @@ type modelComp struct { func (this *modelComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { err = this.MCompModel.Init(service, module, comp, options) + this.module = module.(*CatchBugs) this.TableName = comm.TablekCanineRabbit this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, diff --git a/modules/dcolor/model.go b/modules/dcolor/model.go index bf2bb9f03..aadd6d2a4 100644 --- a/modules/dcolor/model.go +++ b/modules/dcolor/model.go @@ -21,6 +21,7 @@ type modelComp struct { func (this *modelComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { err = this.MCompModel.Init(service, module, comp, options) + this.module = module.(*DColor) this.TableName = comm.TableDcolor this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, diff --git a/modules/moonlv/module.go b/modules/moonlv/module.go index 896cdaba7..3c28d6e20 100644 --- a/modules/moonlv/module.go +++ b/modules/moonlv/module.go @@ -116,8 +116,8 @@ func (this *Moonlv) Reddot(session comm.IUserSession, rid map[comm.ReddotType]st for _, v := range condisProgress { if v.State == pb.BuriedItemFinishState_buried_finish { if value, ok := info.Tasks[v.Conid]; !ok || value == 0 { - items[comm.Reddot34101] = &pb.ReddotItem{ - Rid: int32(comm.Reddot34101), + items[comm.Reddot36101] = &pb.ReddotItem{ + Rid: int32(comm.Reddot36101), Activated: true, } break diff --git a/modules/realarena/api_info.go b/modules/realarena/api_info.go index 76f7cf52d..fab849eb1 100644 --- a/modules/realarena/api_info.go +++ b/modules/realarena/api_info.go @@ -6,7 +6,7 @@ import ( ) // 参数校验 -func (this *apiComp) InfoCheck(session comm.IUserSession, req *pb.ReddotGetReq) (errdata *pb.ErrorData) { +func (this *apiComp) InfoCheck(session comm.IUserSession, req *pb.RealArenaInfoReq) (errdata *pb.ErrorData) { return } diff --git a/modules/realarena/api_match.go b/modules/realarena/api_match.go index 68574f3aa..677747734 100644 --- a/modules/realarena/api_match.go +++ b/modules/realarena/api_match.go @@ -6,7 +6,7 @@ import ( ) // 参数校验 -func (this *apiComp) MatchCheck(session comm.IUserSession, req *pb.ReddotGetReq) (errdata *pb.ErrorData) { +func (this *apiComp) MatchCheck(session comm.IUserSession, req *pb.RealArenaMatchReq) (errdata *pb.ErrorData) { return } diff --git a/modules/sociaty/model_sociaty.go b/modules/sociaty/model_sociaty.go index cacc9ea9a..e8da3ee30 100644 --- a/modules/sociaty/model_sociaty.go +++ b/modules/sociaty/model_sociaty.go @@ -214,40 +214,21 @@ func (this *ModelSociaty) getUserSociaty(uid string) (sociaty *pb.DBSociaty) { userEx *pb.DBUserExpand err error ) - if this.module.IsCross() { - userEx, err = this.module.ModuleUser.GetUserExpand(uid) - if err != nil { - return - } - if userEx.SociatyId != "" { - sociaty, _ = this.getSociaty(userEx.SociatyId) - if sociaty != nil { + userEx, err = this.module.ModuleUser.GetUserExpand(uid) + if err != nil { + return + } + if userEx.SociatyId != "" { + sociaty, _ = this.getSociaty(userEx.SociatyId) + if sociaty != nil { + if db.IsCross() { //验证是否解散 if this.isDismiss(sociaty) { sociaty.Id = "" } } } - } else { - userEx, err = this.module.ModuleUser.GetUserExpand(uid) - if err != nil { - return - } - if userEx.SociatyId != "" { - sociaty = &pb.DBSociaty{} - if err = this.module.service.AcrossClusterRpcCall( - context.Background(), - this.module.GetCrossTag(), - comm.Service_Worker, - string(comm.Rpc_ModuleSociaty), - pb.RPCGeneralReqA1{Param1: userEx.SociatyId}, - sociaty); err != nil { - this.module.Errorln(err) - } - this.module.Debug("跨服获取公会信息", log.Field{Key: "uid", Value: uid}, log.Field{Key: "sociatyId", Value: sociaty.Id}) - } } - return } diff --git a/modules/sociaty/model_sociatytask.go b/modules/sociaty/model_sociatytask.go index 23ebc49d0..4feb7e21e 100644 --- a/modules/sociaty/model_sociatytask.go +++ b/modules/sociaty/model_sociatytask.go @@ -8,6 +8,7 @@ import ( "go_dreamfactory/modules" "go_dreamfactory/pb" "go_dreamfactory/sys/configure" + "go_dreamfactory/sys/db" "go_dreamfactory/utils" "go.mongodb.org/mongo-driver/bson" @@ -63,8 +64,15 @@ func (this *ModelSociatyTask) initSociatyTask(session comm.IUserSession, sociaty // 公会任务列表 func (this *ModelSociatyTask) getUserTask(uid, sociatyId string) (task *pb.DBSociatyTask, err error) { + var ( + model *db.DBModel + ) + if model, err = this.module.GetCrossDBModel(this.TableName); err != nil { + return + } + task = &pb.DBSociatyTask{} - err = this.GetListObj(sociatyId, uid, task) + err = model.GetListObj(sociatyId, uid, task) return }