From 5fef41e1325397a459ed013c8e1fd57ed39dd02d Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 18:00:15 +0800 Subject: [PATCH] Refactor code --- internal/api/friend/friend.go | 3 ++- pkg/base_info/friend_api_struct.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index d6d960f24..5d9b0060a 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -383,10 +383,11 @@ func GetFriendList(c *gin.Context) { } resp := api.GetFriendListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, FriendInfoList: RpcResp.FriendInfoList} - resp.FriendInfoList[0].CreateTime = resp.FriendInfoList[0].CreateTime / 100 + resp.TestTime = 1641450220 resp.Data = jsonData.JsonDataList(resp.FriendInfoList) log.NewInfo(req.CommID.OperationID, "GetFriendList api return ", resp) c.JSON(http.StatusOK, resp) + //c.JSON(http.StatusOK, resp) } func GetFriendApplyList(c *gin.Context) { diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index 64b71b284..fed88743f 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -111,7 +111,8 @@ type GetFriendListReq struct { } type GetFriendListResp struct { CommResp - FriendInfoList []*open_im_sdk.FriendInfo `json:"-"` + TestTime uint32 `json:"test_time"` + FriendInfoList []*open_im_sdk.FriendInfo `json:"test_data"` Data []map[string]interface{} `json:"data"` }