partner.proto 5.0 KB

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