Refactor code

pull/131/head
wenxu12345 3 years ago
parent fb7c4114c1
commit 667ceb2115

@ -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

@ -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 {

@ -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"`
}

Loading…
Cancel
Save