|
|
@ -453,12 +453,15 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq)
|
|
|
|
log.NewInfo(req.OperationID, "JoinGroup args ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, "JoinGroup args ", req.String())
|
|
|
|
_, err := imdb.GetUserByUserID(req.OpUserID)
|
|
|
|
_, err := imdb.GetUserByUserID(req.OpUserID)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.OpUserID)
|
|
|
|
log.NewError(req.OperationID, "GetUserByUserID failed ", err.Error(), req.OpUserID)
|
|
|
|
return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
|
|
|
|
return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var groupRequest imdb.GroupRequest
|
|
|
|
var groupRequest imdb.GroupRequest
|
|
|
|
utils.CopyStructFields(&groupRequest, req)
|
|
|
|
groupRequest.UserID = req.OpUserID
|
|
|
|
|
|
|
|
groupRequest.ReqMsg = req.ReqMessage
|
|
|
|
|
|
|
|
groupRequest.GroupID = req.GroupID
|
|
|
|
|
|
|
|
|
|
|
|
err = imdb.UpdateGroupRequest(groupRequest)
|
|
|
|
err = imdb.UpdateGroupRequest(groupRequest)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
log.NewError(req.OperationID, "UpdateGroupRequest ", err.Error(), groupRequest)
|
|
|
|
log.NewError(req.OperationID, "UpdateGroupRequest ", err.Error(), groupRequest)
|
|
|
|