This commit is contained in:
meixiongfeng 2023-03-16 12:36:35 +08:00
commit 94a883422a
2 changed files with 23 additions and 21 deletions

View File

@ -96,34 +96,34 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (c
//初始化用户设置
// this.module.modelSetting.InitSetting(session.GetUserId())
go func() {
//初始化公会 date3.10
sociaty := this.module.CrossCreateSociaty(uid, req.NickName)
if sociaty == nil {
return
}
this.module.Debugf("公会ID:%v", sociaty.Id)
exUpdate := map[string]interface{}{
"sociatyId": sociaty.Id,
}
// go func() {
// //初始化公会 date3.10
// sociaty := this.module.CrossCreateSociaty(uid, req.NickName)
// if sociaty == nil {
// return
// }
// this.module.Debugf("公会ID:%v", sociaty.Id)
// exUpdate := map[string]interface{}{
// "sociatyId": sociaty.Id,
// }
if err := this.module.ModuleUser.ChangeUserExpand(uid, exUpdate); err != nil {
code = pb.ErrorCode_DBError
this.module.Error("更新玩家公会ID",
log.Field{Key: "uid", Value: uid},
log.Field{Key: "sociatyId", Value: sociaty.Id},
log.Field{Key: "err", Value: err.Error()},
)
return
}
// if err := this.module.ModuleUser.ChangeUserExpand(uid, exUpdate); err != nil {
// code = pb.ErrorCode_DBError
// this.module.Error("更新玩家公会ID",
// log.Field{Key: "uid", Value: uid},
// log.Field{Key: "sociatyId", Value: sociaty.Id},
// log.Field{Key: "err", Value: err.Error()},
// )
// return
// }
}()
// }()
if err := session.SendMsg(string(this.module.GetType()), UserSubTypeCreate, &pb.UserCreateResp{IsSucc: true}); err != nil {
code = pb.ErrorCode_SystemError
}
if req.Figure != 0 {
this.module.ModuleRtask.TriggerTask(uid,&comm.TaskParam{TT:comm.Rtype72,Params: []int32{1}})
this.module.ModuleRtask.TriggerTask(uid, comm.GettaskParam(comm.Rtype72,1))
}
this.mail.SendMailByCid(session, comm.Welcomemail, nil)

View File

@ -245,6 +245,7 @@ func (this *User) CrossUserSession(uid string) *pb.CacheUser {
}
// 跨服创建玩家公会 date 3.10
// Deprecated
func (this *User) CrossCreateSociaty(uid, sociatyName string) *pb.DBSociaty {
sociaty := &pb.DBSociaty{}
this.service.AcrossClusterRpcCall(context.Background(), this.GetCrossTag(),
@ -253,6 +254,7 @@ func (this *User) CrossCreateSociaty(uid, sociatyName string) *pb.DBSociaty {
}
// date 3.10
// Deprecated
func (this *User) RpcCreateSociaty(ctx context.Context, req *pb.RPCGeneralReqA2, rsp *pb.DBSociaty) error {
conn, err := db.Local()
if err != nil {