公会红点
This commit is contained in:
parent
d57ec13b9d
commit
764ca2a466
@ -197,24 +197,10 @@ func (this *ModelSociaty) getUserSociaty(uid string) (sociaty *pb.DBSociaty) {
|
|||||||
)
|
)
|
||||||
if this.moduleSociaty.IsCross() {
|
if this.moduleSociaty.IsCross() {
|
||||||
userEx, err = this.moduleSociaty.ModuleUser.GetRemoteUserExpand(uid)
|
userEx, err = this.moduleSociaty.ModuleUser.GetRemoteUserExpand(uid)
|
||||||
} else {
|
|
||||||
userEx, err = this.moduleSociaty.ModuleUser.GetUserExpand(uid)
|
|
||||||
sociaty = &pb.DBSociaty{}
|
|
||||||
if err = this.moduleSociaty.service.AcrossClusterRpcCall(
|
|
||||||
context.Background(),
|
|
||||||
this.moduleSociaty.GetCrossTag(),
|
|
||||||
comm.Service_Worker,
|
|
||||||
string(comm.Rpc_ModuleFriendUseAssitHero),
|
|
||||||
pb.RPCGeneralReqA1{Param1: userEx.SociatyId},
|
|
||||||
sociaty); err != nil {
|
|
||||||
this.moduleSociaty.Errorln(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("GetUserExpand uid:%v err:%v", uid, err)
|
log.Errorf("GetUserExpand uid:%v err:%v", uid, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if userEx.SociatyId != "" {
|
if userEx.SociatyId != "" {
|
||||||
sociaty = this.getSociaty(userEx.SociatyId)
|
sociaty = this.getSociaty(userEx.SociatyId)
|
||||||
if sociaty.Id != "" {
|
if sociaty.Id != "" {
|
||||||
@ -224,6 +210,26 @@ func (this *ModelSociaty) getUserSociaty(uid string) (sociaty *pb.DBSociaty) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
userEx, err = this.moduleSociaty.ModuleUser.GetUserExpand(uid)
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("GetUserExpand uid:%v err:%v", uid, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if userEx.SociatyId != "" {
|
||||||
|
sociaty = &pb.DBSociaty{}
|
||||||
|
if err = this.moduleSociaty.service.AcrossClusterRpcCall(
|
||||||
|
context.Background(),
|
||||||
|
this.moduleSociaty.GetCrossTag(),
|
||||||
|
comm.Service_Worker,
|
||||||
|
string(comm.Rpc_ModuleSociaty),
|
||||||
|
pb.RPCGeneralReqA1{Param1: userEx.SociatyId},
|
||||||
|
sociaty); err != nil {
|
||||||
|
this.moduleSociaty.Errorln(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,6 +114,7 @@ func (this *Sociaty) Reddot(uid string, rid ...comm.ReddotType) (reddot map[comm
|
|||||||
// 跨服获取公会
|
// 跨服获取公会
|
||||||
func (this *Sociaty) RpcGetSociaty(ctx context.Context, req *pb.RPCGeneralReqA1, reply *pb.DBSociaty) error {
|
func (this *Sociaty) RpcGetSociaty(ctx context.Context, req *pb.RPCGeneralReqA1, reply *pb.DBSociaty) error {
|
||||||
this.Debug("Rpc_ModuleSociaty", log.Field{Key: "req", Value: req})
|
this.Debug("Rpc_ModuleSociaty", log.Field{Key: "req", Value: req})
|
||||||
reply = this.modelSociaty.getSociaty(req.Param1)
|
sociaty := this.modelSociaty.getSociaty(req.Param1)
|
||||||
|
*reply = *sociaty
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user