statistics.proto 4.8 KB

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