zhibo/Log/系统/后端接口缺失分析报告.md
2025-12-26 16:17:47 +08:00

12 KiB
Raw Blame History

直播社交接口分析报告

生成时间: 2024年12月26日 分析范围: Android App 与 Zhibo-H 后端直播社交接口对比 说明: 本报告只分析直播社交相关接口不包含电商接口电商接口后端已有CRMEB原有实现


📊 总体概况

一、后端接口状态统计

分类 后端已实现 后端未实现 App已对接 App未对接
用户认证 6 0 2 4
用户资料 4 3 1 3
直播间 10 3 4 6
私聊消息 10 1 8 2
好友管理 6 0 6 0
礼物打赏 5 0 0 5
在线状态 7 0 0 7
离线消息 6 0 0 6
通话功能 10 0 0 10
文件上传 2 0 0 2
社交功能 0 8 0 0
通知推送 0 5 0 0
作品管理 0 6 0 0
搜索功能 0 4 0 0

二、关键数据

指标 数量
后端已实现接口 66 个
后端未实现接口 30 个
App已对接接口 21 个
App未对接接口 45 个
后端完成度 69%
App对接完成度 32%

已实现的接口

1. 用户认证模块 (5/7)

接口 路径 状态
账号密码登录 POST /api/front/login
手机号登录 POST /api/front/login/mobile
用户注册 POST /api/front/register
发送验证码 POST /api/front/sendCode
退出登录 GET /api/front/logout
Token校验 POST /api/front/token/is/exist

2. 用户资料模块 (4/10)

接口 路径 状态
获取用户中心信息 GET /api/front/user
修改个人资料 POST /api/front/user/edit
修改密码 POST /api/front/register/reset
换绑手机号 POST /api/front/update/binding

3. 直播间模块 (8/13)

接口 路径 状态
获取直播间列表 GET /api/front/live/public/rooms
获取直播间详情 GET /api/front/live/public/rooms/{id}
创建直播间 POST /api/front/live/rooms
删除直播间 DELETE /api/front/live/rooms/{id}
获取弹幕消息 GET /api/front/live/public/rooms/{roomId}/messages
发送弹幕消息 POST /api/front/live/public/rooms/{roomId}/messages
获取观看人数 GET /api/front/live/public/rooms/{roomId}/viewers/count
关注/取消关注主播 POST /api/front/live/follow (框架)

4. 私聊消息模块 (9/11)

接口 路径 状态
获取会话列表 GET /api/front/conversations
搜索会话 GET /api/front/conversations/search
获取/创建会话 POST /api/front/conversations/with/{otherUserId}
标记会话已读 POST /api/front/conversations/{id}/read
删除会话 DELETE /api/front/conversations/{id}
获取消息列表 GET /api/front/conversations/{id}/messages
发送私信 POST /api/front/conversations/{id}/messages
删除消息 DELETE /api/front/conversations/messages/{id}
撤回消息 POST /api/front/conversations/messages/{id}/recall
获取消息详情 GET /api/front/conversations/messages/{id}

5. 好友管理模块 (6/6) 完成

接口 路径 状态
搜索用户 GET /api/front/users/search
发送好友请求 POST /api/front/friends/request
获取好友请求列表 GET /api/front/friends/requests
处理好友请求 POST /api/front/friends/requests/{id}/handle
获取好友列表 GET /api/front/friends
删除好友 DELETE /api/front/friends/{friendId}

6. 礼物打赏模块 (5/6)

接口 路径 状态
获取礼物列表 GET /api/front/gift/list
获取用户余额 GET /api/front/gift/balance
赠送礼物 POST /api/front/gift/send
获取充值选项 GET /api/front/gift/recharge/options
创建充值订单 POST /api/front/gift/recharge/create

7. 通话模块 (10/10) 完成 (刚实现)

接口 路径 状态
发起通话 POST /api/front/call/initiate
接听通话 POST /api/front/call/accept/{callId}
拒绝通话 POST /api/front/call/reject/{callId}
取消通话 POST /api/front/call/cancel/{callId}
结束通话 POST /api/front/call/end/{callId}
获取通话记录 GET /api/front/call/history
删除通话记录 DELETE /api/front/call/record/{recordId}
获取未接来电数 GET /api/front/call/missed/count
获取通话状态 GET /api/front/call/status
获取通话详情 GET /api/front/call/detail/{callId}

未实现的接口

1. 用户资料模块 (缺失 6 个)

接口 期望路径 优先级 说明
上传头像 POST /api/front/user/avatar App EditProfileActivity 需要
获取用户详情 GET /api/front/user/info 多处需要获取用户信息
获取其他用户资料 GET /api/front/user/profile/{userId} 查看他人主页
获取登录设备列表 GET /api/front/user/devices 设备管理功能
踢出设备 DELETE /api/front/user/devices/{deviceId} 设备管理功能
注销账号 POST /api/front/user/delete 账号注销

2. 直播间模块 (缺失 5 个)

接口 期望路径 优先级 说明
获取房间分类列表 GET /api/front/live/categories 分类筛选
按分类获取房间 GET /api/front/live/rooms?category={id} 分类筛选
获取关注主播的直播间 GET /api/front/live/following/rooms 关注页面
获取推荐直播间 GET /api/front/live/recommend 发现页面
点赞/取消点赞房间 POST /api/front/live/rooms/{id}/like 房间点赞

3. 私聊消息模块 (缺失 2 个)

接口 期望路径 优先级 说明
获取未读消息总数 GET /api/front/messages/unread/count 消息红点
转发消息 POST /api/front/conversations/messages/{id}/forward 消息转发

4. 社交功能模块 (缺失 8 个) ⚠️ 重要

接口 期望路径 优先级 说明
关注用户 POST /api/front/follow/{userId} 关注功能
取消关注 DELETE /api/front/follow/{userId} 取消关注
获取关注列表 GET /api/front/following 关注列表页
获取粉丝列表 GET /api/front/fans 粉丝列表页
获取获赞列表 GET /api/front/likes 获赞列表
获取附近用户 GET /api/front/users/nearby 附近/缘池功能
检查关注状态 GET /api/front/follow/status/{userId} 判断是否已关注
获取关注/粉丝数量 GET /api/front/user/social/count 个人主页显示

5. 通知推送模块 (缺失 5 个) ⚠️ 重要

接口 期望路径 优先级 说明
获取通知列表 GET /api/front/notifications 通知页面
标记通知已读 POST /api/front/notifications/{id}/read 已读状态
标记全部已读 POST /api/front/notifications/read/all 一键已读
获取通知设置 GET /api/front/notifications/settings 通知设置
更新通知设置 PUT /api/front/notifications/settings 通知设置

6. 搜索功能模块 (缺失 4 个)

接口 期望路径 优先级 说明
综合搜索 GET /api/front/search 搜索用户/直播间/作品
搜索直播间 GET /api/front/search/rooms 搜索直播间
搜索作品 GET /api/front/search/works 搜索作品
获取热门搜索 GET /api/front/search/hot 热门搜索词

7. 作品管理模块 (缺失 6 个) ⚠️ 重要

接口 期望路径 优先级 说明
发布作品 POST /api/front/works 发布作品
获取作品列表 GET /api/front/works 作品列表
获取作品详情 GET /api/front/works/{id} 作品详情
删除作品 DELETE /api/front/works/{id} 删除作品
点赞作品 POST /api/front/works/{id}/like 作品点赞
收藏作品 POST /api/front/works/{id}/collect 作品收藏

8. 评论功能模块 (缺失 4 个)

接口 期望路径 优先级 说明
获取评论列表 GET /api/front/works/{id}/comments 作品评论
发表评论 POST /api/front/works/{id}/comments 发表评论
回复评论 POST /api/front/comments/{id}/reply 回复评论
删除评论 DELETE /api/front/comments/{id} 删除评论

9. 文件上传模块 (缺失 2 个)

接口 期望路径 优先级 说明
上传图片 POST /api/front/upload/image 通用图片上传
上传视频 POST /api/front/upload/video 视频上传

10. 其他功能 (缺失 8 个)

接口 期望路径 优先级 说明
获取首页标签配置 GET /api/front/home/tabs 首页标签
记录播放开始 POST /api/front/play/start 播放统计
记录播放结束 POST /api/front/play/end 播放统计
获取分享链接 GET /api/front/share/profile/{userId} 分享功能
记录分享行为 POST /api/front/share/record 分享统计
获取观看历史 GET /api/front/watch/history 观看历史
意见反馈 POST /api/front/feedback 意见反馈
获取APP版本 GET /api/front/app/version 版本检查

🎯 优先级建议

第一优先级 (高) - 核心功能

  1. 社交功能 - 关注/粉丝系统 (8个接口)
  2. 通知推送 - 通知列表和管理 (5个接口)
  3. 用户资料 - 头像上传、用户详情 (3个接口)
  4. 未读消息 - 消息红点显示 (1个接口)
  5. 文件上传 - 图片上传接口 (1个接口)

第二优先级 (中) - 增强功能

  1. 作品管理 - 发布、列表、详情 (6个接口)
  2. 搜索功能 - 综合搜索 (4个接口)
  3. 直播间分类 - 分类筛选 (3个接口)
  4. 评论功能 - 作品评论 (4个接口)

第三优先级 (低) - 辅助功能

  1. 设备管理
  2. 播放统计
  3. 分享功能
  4. 观看历史
  5. 意见反馈

📝 实现建议

1. 社交功能实现方案

需要创建以下数据库表:

  • eb_user_follow - 关注关系表
  • 字段id, user_id, follow_user_id, create_time

需要创建的类:

  • FollowController - 关注控制器
  • FollowService / FollowServiceImpl - 关注服务
  • FollowDao - 数据访问层
  • UserFollow - 实体类 (JPA)

2. 通知推送实现方案

需要创建以下数据库表:

  • eb_notification - 通知表
  • 字段id, user_id, type, title, content, is_read, create_time

需要创建的类:

  • NotificationController - 通知控制器
  • NotificationService / NotificationServiceImpl - 通知服务
  • NotificationDao - 数据访问层
  • Notification - 实体类 (JPA)

3. 作品管理实现方案

需要创建以下数据库表:

  • eb_work - 作品表
  • eb_work_like - 作品点赞表
  • eb_work_collect - 作品收藏表
  • eb_work_comment - 作品评论表

📊 工作量估算

模块 接口数 预计工时
社交功能 8 3-4天
通知推送 5 2-3天
作品管理 6 3-4天
评论功能 4 2天
搜索功能 4 2天
用户资料补充 6 2天
直播间补充 5 2天
其他功能 10 3天

总计预估: 19-22 个工作日


报告生成时间: 2024年12月26日