Commit 9aa6c780 by Li Feifei

解决冲突

parent 23ab5719
......@@ -44,7 +44,7 @@ type ImUser struct {
Accid string
Appkey string
Name string
Mob adile string
Mobile string
Disable int64
MuteEstoppel int64
MuteAudioVideo int64
......
......@@ -53,17 +53,17 @@ func (u *ImUserServer) ImUserRegister(ctx context.Context, in *pb.ImUserRequest)
}
reply = &pb.ImUserReply{}
// 是否已经注册过, 如果已经注册返回用户信息
if c_user, _ := GetImUserByMobile(imUser.Mobile); c_user.Appid != "" {
reply.Appid = c_user.Appid
if c_user, _ := GetImUserByMobile(imUser.Mobile); c_user.Accid != "" {
reply.Appid = c_user.Accid
return
}
// 企业用户注册失败
c_user, err := helper.CreateImUser(imUser.Name, imUser.Mobile)
c_user, err := CreateImUser(imUser.Name, imUser.Mobile)
if err != nil {
return
}
reply.Appid = c_user.Appid
reply.Appid = c_user.Accid
return
}
......@@ -93,7 +93,7 @@ func (u *ImUserServer) ImUserLogin(ctx context.Context, in *pb.ImUserRequest) (r
}
reply = &pb.ImUserReply{}
c_user, _ := GetImUserByMobile(imUser.Mobile)
if c_user.Appid == "" {
if c_user.Accid == "" {
err = errors.New("用户不存在")
return
}
......@@ -102,7 +102,7 @@ func (u *ImUserServer) ImUserLogin(ctx context.Context, in *pb.ImUserRequest) (r
err = errors.New("用户登录时间更新失败")
return
}
reply.Appid = c_user.Appid
reply.Appid = c_user.Accid
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