diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 6135ee3f0..ea126b1c8 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -41,7 +41,7 @@ func main() { friendRouterGroup.POST("/delete_friend", friend.DeleteFriend) friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) //1 friendRouterGroup.POST("/set_friend_remark", friend.SetFriendRemark) //1 - friendRouterGroup.POST("/is_friend", friend.IsFriend) + friendRouterGroup.POST("/is_friend", friend.IsFriend) //1 friendRouterGroup.POST("/import_friend", friend.ImportFriend) } //group related routing group diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index d5db10e1f..4fe757f11 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -116,7 +116,7 @@ func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlackl log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return &pbFriend.AddBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } - black := imdb.Black{OwnerUserID: req.CommID.FromUserID, BlockUserID: req.CommID.ToUserID} + black := imdb.Black{OwnerUserID: req.CommID.FromUserID, BlockUserID: req.CommID.ToUserID, OperatorUserID: req.CommID.OpUserID} err := imdb.InsertInToUserBlackList(black) if err != nil { diff --git a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go index 29125d813..bd35c6314 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go +++ b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go @@ -161,6 +161,6 @@ type Black struct { CreateTime time.Time `gorm:"column:create_time"` BlockUserID string `gorm:"column:block_user_id;primaryKey;"` AddSource int32 `gorm:"column:add_source"` - OperatorUserID int32 `gorm:"column:operator_user_id"` + OperatorUserID string `gorm:"column:operator_user_id"` Ex string `gorm:"column:ex"` }