statistics.proto 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. syntax = "proto3";
  2. package api.statistics;
  3. import "google/api/annotations.proto";
  4. //import "google/protobuf/struct.proto";
  5. import "google/protobuf/empty.proto";
  6. import "api/common/common.proto";
  7. option go_package = "git.ikuban.com/server/pw-protobuf/api/statistics;statistics";
  8. option java_multiple_files = true;
  9. option java_package = "api.statistics";
  10. service Statistics {
  11. // 观看用户主页
  12. rpc LookPerson (PersonMessage) returns (google.protobuf.Empty);
  13. // 关注用户
  14. rpc LikePerson (PersonMessage) returns (google.protobuf.Empty);
  15. // 取关用户
  16. rpc UnLikePerson (PersonMessage) returns (google.protobuf.Empty);
  17. // 获取喜欢以及访问统计信息
  18. rpc GetLookAndLikeStatisticsMessage (GetLookAndLikeStatisticsMessageRequest) returns (LookAndLikeMessageReply);
  19. // 获取访问统计信息
  20. rpc GetLookStatisticsMessage (common.PersonParam) returns (LookMessageReply);
  21. // 减少"喜欢我的"的未读数
  22. rpc ReduceLikeUnreadNum (PersonMessage) returns (google.protobuf.Empty);
  23. // 解锁"看过我的"的记录
  24. rpc UnlockLookRecord (UnlockLookRecordRequest) returns (google.protobuf.Empty);
  25. // 查看看过我的列表
  26. rpc FindLookList (GetLookAndLikeListRequest) returns (LookAndLikeListReply);
  27. // 查看我喜欢的列表
  28. rpc FindLikeList (GetLookAndLikeListRequest) returns (LookAndLikeListReply);
  29. // 查看喜欢我的列表
  30. rpc FindLikedList (GetLookAndLikeListRequest) returns (LookAndLikeListReply);
  31. // 获取我是否喜欢(关注)该用户
  32. rpc GetIsLike (PersonMessage) returns (common.IsLike);
  33. // 统计订阅消息
  34. rpc StatisticsSubscribeMessage (StatisticsSubscribeMessageRequest) returns (google.protobuf.Empty){
  35. option (google.api.http) = {
  36. post: "/api/common/subscribe/statistic",
  37. body:"*"
  38. };
  39. };
  40. // 减少订阅消息
  41. rpc ReduceSubscribeMessage (ReduceSubscribeMessageRequest) returns (google.protobuf.Empty){};
  42. // 获取订阅了签到的人
  43. rpc GetSignUser (google.protobuf.Empty) returns (common.PersonIDList){};
  44. // 定时删除过期的访客记录
  45. rpc CronDeleteOldLookRecord (google.protobuf.Empty) returns (google.protobuf.Empty){};
  46. }
  47. message ReduceSubscribeMessageRequest{
  48. string subscribeId = 1;
  49. string userId = 2;
  50. }
  51. message StatisticsSubscribeMessageRequest{
  52. repeated string idList = 1;
  53. }
  54. message GetPartnerReplyMsgReply{
  55. double fiveMinuteReplyRate = 1;// 五分钟回复率
  56. int64 chatNum = 2;// 聊天数
  57. int64 replyNum = 3;// 回复数
  58. int64 fiveMinuteReplyNum = 4; // 五分钟回复数
  59. }
  60. message PartnerReplyUserRequest{
  61. string partnerID = 1;
  62. int64 userSendTime = 2;// 用户发送时间
  63. int64 partnerReplyTime = 3;// 接待员回复时间
  64. }
  65. message AddTodayProfitRequest{
  66. string personID = 1; // 接待者的ID
  67. int64 profit = 2;// 收益
  68. }
  69. message GetLookAndLikeStatisticsMessageRequest{
  70. string personID = 1; // 查询目标的ID
  71. bool isSelf = 3;
  72. }
  73. message ReceptionMsg{
  74. int64 todayReceptionNum = 1; //今日接待人数
  75. }
  76. message TodayProfitMsg{
  77. int64 todayProfit = 1; // 今日收益
  78. }
  79. message LookAndLikeListReply{
  80. repeated LookAndLikeListInfo list = 1;
  81. int64 nextId = 2;
  82. }
  83. message LookAndLikeListInfo{
  84. string id = 1; // 被查看的列表中的人的ID
  85. string nickname = 3;// 昵称
  86. string avatarUrl =4;// 头像链接
  87. int64 sex = 5;// 性别
  88. int64 age = 6;// 年龄
  89. string constellation = 7; // 星座
  90. int64 lastLookTime = 8; // 上次访问时间
  91. bool isHavePicture = 10; // 是否有图片
  92. bool isHaveVoice = 11; // 是否有语音
  93. bool isLock = 12;// 是否锁住信息
  94. string city = 13;// 市
  95. bool isRead = 14;// 是否已读
  96. repeated string tagList = 15; // 标签列表
  97. bool isVip = 16;// 是否是Vip
  98. int64 vipLevel = 17;// vip等级
  99. bool isYearVip = 18;// 是否是年费Vip
  100. repeated string vipFunctions = 19;// vip功能
  101. }
  102. message GetLookAndLikeListRequest{
  103. string personID = 1; // 查询目标的ID
  104. int64 nextId = 3;
  105. int64 offset = 4;
  106. }
  107. message LookAndLikeMessageReply{
  108. int64 likeNum = 1;// 我喜欢
  109. int64 likedNum = 2;// 喜欢我
  110. int64 likedUnreadNum = 3;// 喜欢我的未读数
  111. int64 lookNum = 4;// 看过我
  112. int64 lookUnreadNum = 5;// 看过我的未读数
  113. repeated string avatarUrlList = 6;// 头像列表
  114. }
  115. message LookMessageReply{
  116. int64 lookNum = 1;
  117. int64 lookUnreadNum = 2;
  118. int64 todayLookNum = 3;
  119. }
  120. message PersonMessage{
  121. string personID = 1; // 关注者、浏览者的ID
  122. string bePersonID = 3; // 被关注者、被浏览者的ID
  123. }
  124. message UnlockLookRecordRequest{
  125. string personID = 1; // 关注者、浏览者的ID
  126. string bePersonID = 2; // 被关注者、被浏览者的ID
  127. }
  128. message ReceptionMessage{
  129. string partnerID = 1; // 接待者的ID
  130. string userID = 2; // 被接待者的ID
  131. }