Commit 9aa6c780 by Li Feifei

解决冲突

parent 23ab5719
...@@ -44,7 +44,7 @@ type ImUser struct { ...@@ -44,7 +44,7 @@ type ImUser struct {
Accid string Accid string
Appkey string Appkey string
Name string Name string
Mob adile string Mobile string
Disable int64 Disable int64
MuteEstoppel int64 MuteEstoppel int64
MuteAudioVideo int64 MuteAudioVideo int64
......
...@@ -53,17 +53,17 @@ func (u *ImUserServer) ImUserRegister(ctx context.Context, in *pb.ImUserRequest) ...@@ -53,17 +53,17 @@ func (u *ImUserServer) ImUserRegister(ctx context.Context, in *pb.ImUserRequest)
} }
reply = &pb.ImUserReply{} reply = &pb.ImUserReply{}
// 是否已经注册过, 如果已经注册返回用户信息 // 是否已经注册过, 如果已经注册返回用户信息
if c_user, _ := GetImUserByMobile(imUser.Mobile); c_user.Appid != "" { if c_user, _ := GetImUserByMobile(imUser.Mobile); c_user.Accid != "" {
reply.Appid = c_user.Appid reply.Appid = c_user.Accid
return return
} }
// 企业用户注册失败 // 企业用户注册失败
c_user, err := helper.CreateImUser(imUser.Name, imUser.Mobile) c_user, err := CreateImUser(imUser.Name, imUser.Mobile)
if err != nil { if err != nil {
return return
} }
reply.Appid = c_user.Appid reply.Appid = c_user.Accid
return return
} }
...@@ -93,7 +93,7 @@ func (u *ImUserServer) ImUserLogin(ctx context.Context, in *pb.ImUserRequest) (r ...@@ -93,7 +93,7 @@ func (u *ImUserServer) ImUserLogin(ctx context.Context, in *pb.ImUserRequest) (r
} }
reply = &pb.ImUserReply{} reply = &pb.ImUserReply{}
c_user, _ := GetImUserByMobile(imUser.Mobile) c_user, _ := GetImUserByMobile(imUser.Mobile)
if c_user.Appid == "" { if c_user.Accid == "" {
err = errors.New("用户不存在") err = errors.New("用户不存在")
return return
} }
...@@ -102,7 +102,7 @@ func (u *ImUserServer) ImUserLogin(ctx context.Context, in *pb.ImUserRequest) (r ...@@ -102,7 +102,7 @@ func (u *ImUserServer) ImUserLogin(ctx context.Context, in *pb.ImUserRequest) (r
err = errors.New("用户登录时间更新失败") err = errors.New("用户登录时间更新失败")
return return
} }
reply.Appid = c_user.Appid reply.Appid = c_user.Accid
return return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment