未读消息个数

  • 地址 GET /api/notification/notRead
  • 请求类型 application/json
  • 参数
    • token
  • 返回 Result(int) // 返回未读消息条数
  1. {
  2. "code": 200,
  3. "description": "SUCCESS",
  4. "detail": 1
  5. }

标记消息已读

  • 地址 GET /api/notification/markRead
  • 请求类型 application/json
  • 参数
    • token
  • 返回 Result()
  1. {
  2. "code": 200,
  3. "description": "SUCCESS",
  4. "detail": null
  5. }

消息列表

  • 地址 GET /api/notification/list
  • 请求类型 application/json
  • 参数
    • token
  • 返回 Result(Map)
  1. {
  2. "code": 200,
  3. "description": "SUCCESS",
  4. "detail": {
  5. "read": [
  6. {
  7. "inTime": 1548993303000,
  8. "topicId": 1,
  9. "read": true,
  10. "action": "COMMENT",
  11. "targetUserId": 1,
  12. "id": 1,
  13. "avatar": "http://localhost:8080/static/upload/avatar/test/avatar.png",
  14. "title": "我是一个话题标题",
  15. "userId": 2,
  16. "content": "我是第二条评论",
  17. "username": "test"
  18. }
  19. ],
  20. "notRead": [
  21. {
  22. "inTime": 1548993369000,
  23. "topicId": 1,
  24. "read": false,
  25. "action": "REPLY",
  26. "targetUserId": 1,
  27. "id": 2,
  28. "avatar": "http://localhost:8080/static/upload/avatar/test/avatar.png",
  29. "title": "我是一个话题标题",
  30. "userId": 2,
  31. "content": "@tomoya 我是第三条评论",
  32. "username": "test"
  33. },
  34. {
  35. "inTime": 1548993369000,
  36. "topicId": 1,
  37. "read": false,
  38. "action": "COMMENT",
  39. "targetUserId": 1,
  40. "id": 3,
  41. "avatar": "http://localhost:8080/static/upload/avatar/test/avatar.png",
  42. "title": "我是一个话题标题",
  43. "userId": 2,
  44. "content": "@tomoya 我是第三条评论",
  45. "username": "test"
  46. }
  47. ]
  48. }
  49. }