From bcc0cd33f164874070bfb060f0d6a8e5f2fe78ae Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Mon, 15 Nov 2021 11:44:04 +0800 Subject: [PATCH] log change --- internal/api/friend/add_friend.go | 2 +- internal/rpc/friend/add_friend.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/friend/add_friend.go b/internal/api/friend/add_friend.go index 199498482..81faa29fb 100644 --- a/internal/api/friend/add_friend.go +++ b/internal/api/friend/add_friend.go @@ -45,7 +45,7 @@ func ImportFriend(c *gin.Context) { RpcResp, err := client.ImportFriend(context.Background(), req) if err != nil { log.NewError(req.OperationID, "rpc importFriend failed", err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "cImportFriend failed" + err.Error()}) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "cImportFriend failed " + err.Error()}) return } log.NewDebug(req.OperationID, "rpc importFriend success", RpcResp.CommonResp.ErrorMsg, RpcResp.CommonResp.ErrorCode, RpcResp.FailedUidList) diff --git a/internal/rpc/friend/add_friend.go b/internal/rpc/friend/add_friend.go index f4581f221..8e7cd7208 100644 --- a/internal/rpc/friend/add_friend.go +++ b/internal/rpc/friend/add_friend.go @@ -81,7 +81,6 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri if _, fErr := im_mysql_model.FindUserByUID(v); fErr != nil { c.ErrorMsg = "some uid establish failed" c.ErrorCode = 408 - resp.CommonResp = &c resp.FailedUidList = append(resp.FailedUidList, v) } else { if _, err = im_mysql_model.FindFriendRelationshipFromFriend(req.OwnerUid, v); err != nil { @@ -127,6 +126,7 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri } } + resp.CommonResp = &c log.NewDebug(req.OperationID, "rpc come end", resp.CommonResp.ErrorCode, resp.CommonResp.ErrorMsg, resp.FailedUidList) return &resp, nil