上传红点修复

This commit is contained in:
liwei1dao 2024-03-07 18:40:29 +08:00
parent 92903907ca
commit 27cd3dff4d
7 changed files with 23 additions and 32 deletions

View File

@ -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) { 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) err = this.MCompModel.Init(service, module, comp, options)
this.module = module.(*CatchBugs)
this.TableName = comm.TablekCanineRabbit this.TableName = comm.TablekCanineRabbit
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},

View File

@ -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) { 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) err = this.MCompModel.Init(service, module, comp, options)
this.module = module.(*DColor)
this.TableName = comm.TableDcolor this.TableName = comm.TableDcolor
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},

View File

@ -116,8 +116,8 @@ func (this *Moonlv) Reddot(session comm.IUserSession, rid map[comm.ReddotType]st
for _, v := range condisProgress { for _, v := range condisProgress {
if v.State == pb.BuriedItemFinishState_buried_finish { if v.State == pb.BuriedItemFinishState_buried_finish {
if value, ok := info.Tasks[v.Conid]; !ok || value == 0 { if value, ok := info.Tasks[v.Conid]; !ok || value == 0 {
items[comm.Reddot34101] = &pb.ReddotItem{ items[comm.Reddot36101] = &pb.ReddotItem{
Rid: int32(comm.Reddot34101), Rid: int32(comm.Reddot36101),
Activated: true, Activated: true,
} }
break break

View File

@ -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 return
} }

View File

@ -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 return
} }

View File

@ -214,7 +214,6 @@ func (this *ModelSociaty) getUserSociaty(uid string) (sociaty *pb.DBSociaty) {
userEx *pb.DBUserExpand userEx *pb.DBUserExpand
err error err error
) )
if this.module.IsCross() {
userEx, err = this.module.ModuleUser.GetUserExpand(uid) userEx, err = this.module.ModuleUser.GetUserExpand(uid)
if err != nil { if err != nil {
return return
@ -222,32 +221,14 @@ func (this *ModelSociaty) getUserSociaty(uid string) (sociaty *pb.DBSociaty) {
if userEx.SociatyId != "" { if userEx.SociatyId != "" {
sociaty, _ = this.getSociaty(userEx.SociatyId) sociaty, _ = this.getSociaty(userEx.SociatyId)
if sociaty != nil { if sociaty != nil {
if db.IsCross() {
//验证是否解散 //验证是否解散
if this.isDismiss(sociaty) { if this.isDismiss(sociaty) {
sociaty.Id = "" 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 return
} }

View File

@ -8,6 +8,7 @@ import (
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"go_dreamfactory/sys/configure" "go_dreamfactory/sys/configure"
"go_dreamfactory/sys/db"
"go_dreamfactory/utils" "go_dreamfactory/utils"
"go.mongodb.org/mongo-driver/bson" "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) { 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{} task = &pb.DBSociatyTask{}
err = this.GetListObj(sociatyId, uid, task) err = model.GetListObj(sociatyId, uid, task)
return return
} }