提交 bcc0cd33 编写于 作者: programor_guo's avatar programor_guo

log change

上级 0daa840e
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册