上传红点修复
This commit is contained in:
parent
92903907ca
commit
27cd3dff4d
@ -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)}},
|
||||
|
@ -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)}},
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -214,7 +214,6 @@ 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
|
||||
@ -222,32 +221,14 @@ func (this *ModelSociaty) getUserSociaty(uid string) (sociaty *pb.DBSociaty) {
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user