partner.proto 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. syntax = "proto3";
  2. package api.partner;
  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. import "api/statistics/statistics.proto";
  8. import "api/chat/chat.proto";
  9. option go_package = "git.ikuban.com/server/pw-protobuf/api/partner;partner";
  10. option java_multiple_files = true;
  11. option java_package = "api.partner";
  12. service Partner {
  13. // 获取接待员的个人信息
  14. rpc GetPartnerInfo (google.protobuf.Empty) returns (PartnerInfo){
  15. option (google.api.http) = {
  16. post: "/api/partner/info",
  17. body:"*"
  18. };
  19. };
  20. // 获取接待员的金额信息
  21. rpc GetPartnerBalance (google.protobuf.Empty) returns (PartnerBalance){
  22. option (google.api.http) = {
  23. post: "/api/partner/balance",
  24. body:"*"
  25. };
  26. };
  27. // 获取用户详情
  28. rpc GetPartnerDBMsg (common.PersonIDParam) returns (common.PersonMsg);
  29. // 获取接待员的部分信息
  30. rpc GetPartnerMessage (google.protobuf.Empty) returns (PartnerMessage){
  31. option (google.api.http) = {
  32. post: "/api/partner/message",
  33. body:"*"
  34. };
  35. };
  36. // 获取接待员访问数详情
  37. rpc GetPartnerLookNum (google.protobuf.Empty) returns (statistics.LookMessageReply){
  38. option (google.api.http) = {
  39. post: "/api/partner/num/look",
  40. body:"*"
  41. };
  42. };
  43. // 接待员发送验证码
  44. rpc SendPhoneCode (common.SendPhoneCodeRequest) returns (google.protobuf.Empty){
  45. option (google.api.http) = {
  46. post: "/api/partner/code/send",
  47. body:"*"
  48. };
  49. };
  50. // 接待员验证验证码
  51. rpc CheckPhoneCode (common.CheckPhoneCodeRequest) returns (google.protobuf.Empty){
  52. option (google.api.http) = {
  53. post: "/api/partner/code/check",
  54. body:"*"
  55. };
  56. };
  57. // 获取接待员的确认通过页面信息
  58. rpc GetPartnerCircleInfo (common.PartnerIDParam) returns (common.AddFriendMessageInfo);
  59. // 更新接待员的信息
  60. rpc UpdatePartnerInformation (common.UpdateInformationRequest) returns (google.protobuf.Empty){
  61. option (google.api.http) = {
  62. post: "/api/partner/update/information",
  63. body:"*"
  64. };
  65. };
  66. rpc GetRandomPartnerInfo (GetRandomPartnerRequest) returns (RandomPartnerInfo);
  67. // 接待员获取ta的主页信息
  68. rpc PartnerGetHomeInfo (common.PersonParam) returns (common.HomeInfo){
  69. option (google.api.http) = {
  70. post: "/api/partner/home",
  71. body:"*"
  72. };
  73. };
  74. // 接待员获取ta的主页访客、关注数
  75. rpc PartnerGetPersonLikedAndLooked (common.PersonParam) returns (common.LookedAndLikedNum){
  76. option (google.api.http) = {
  77. post: "/api/partner/num",
  78. body:"*"
  79. };
  80. };
  81. // 查看看过我的列表
  82. rpc FindLookList (common.ListPageRequest) returns (statistics.LookAndLikeListReply){
  83. option (google.api.http) = {
  84. post: "/api/partner/list/look",
  85. body:"*"
  86. };
  87. };
  88. // 通过接待员IDs查看接待员信息列表
  89. rpc FindPartnerDBList (common.PersonIDList) returns (common.PersonDBReply);
  90. // 微信SDK初始化
  91. rpc WxConf (common.WxConfReq) returns (common.WxConfResponse){
  92. option (google.api.http) = {
  93. post: "/api/wx/jssdk/config",
  94. body:"*"
  95. };
  96. };
  97. // 创建用户与接待员的关联
  98. rpc CreateUserPartnerRoom (common.PersonIDParam) returns (chat.RoomReply){
  99. option (google.api.http) = {
  100. post: "/api/partner/create/room",
  101. body:"*"
  102. };
  103. };
  104. // 获取标签列表
  105. rpc FindTagListBySex (common.SexReq) returns (common.TagListReply){
  106. option (google.api.http) = {
  107. post: "/api/partner/list/tag",
  108. body:"*"
  109. };
  110. };
  111. // 获取标签列表
  112. rpc FindOnlineList (common.ListPage2Request) returns (common.OnlinePersonListReply){
  113. option (google.api.http) = {
  114. post: "/api/partner/list/online",
  115. body:"*"
  116. };
  117. };
  118. }
  119. message PartnerInfo{
  120. string id = 1; // id
  121. string nickname = 2;// 昵称
  122. string avatarUrl =3;// 头像链接
  123. int64 age = 4;// 年龄
  124. int64 sex = 5;// 性别
  125. string constellation = 6; // 星座
  126. int64 level = 7;// 等级
  127. repeated int64 tagList = 8; // 标签
  128. string signature = 9; // 签名
  129. string introduceVoice = 10; // 介绍语音
  130. string province = 11;// 省
  131. string city = 12;// 市
  132. string area = 13;// 区
  133. }
  134. message PartnerMessage{
  135. string id = 1; // id
  136. int64 lookNum = 2; // 看过我的数量
  137. int64 lookUnreadNum = 3; // 未读的看过我的数量
  138. int64 todayReceptionNum = 4;// 今日接待人数
  139. string reversionRate = 5;// 五分钟的回复率
  140. }
  141. message PartnerBalance{
  142. string id = 1; // id
  143. int64 balance = 2;// 可提现余额
  144. int64 todayProfit = 3;// 今日收益
  145. }
  146. message RandomPartnerInfo{
  147. string id = 1; // id
  148. string nickname = 2;// 昵称
  149. string avatarUrl =3;// 头像链接
  150. int64 sex = 4;// 性别
  151. }
  152. message GetRandomPartnerRequest{
  153. int64 sex = 1;// 性别
  154. }