partner.proto 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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. rpc FindUnReplyRoomList (common.ListPageRequest) returns (chat.PartnerFindRoomListReply){
  121. option (google.api.http) = {
  122. post: "/api/partner/list/chat/unreply",
  123. body:"*"
  124. };
  125. };
  126. // 七天内列表(当前会话)
  127. rpc FindWithinSevenDayRoomList (common.ListPageRequest) returns (chat.PartnerFindRoomListReply){
  128. option (google.api.http) = {
  129. post: "/api/partner/list/chat/within",
  130. body:"*"
  131. };
  132. };
  133. // 七天外列表(更早的聊天记录)
  134. rpc FindOverSevenDayRoomList (common.ListPageRequest) returns (chat.PartnerFindRoomListReply){
  135. option (google.api.http) = {
  136. post: "/api/partner/list/chat/over",
  137. body:"*"
  138. };
  139. };
  140. // 接待者查询聊天记录
  141. rpc FindChatRecordList (common.FindChatRecordListRequest) returns (common.ChatRecordListReply){
  142. option (google.api.http) = {
  143. post: "/api/partner/chat/record",
  144. body:"*"
  145. };
  146. };
  147. // 接待者查询房间信息
  148. rpc FindChatRoomMsg (common.FindChatRoomMsgRequest) returns (common.ChatRoomMsg){
  149. option (google.api.http) = {
  150. post: "/api/partner/chat/room/msg",
  151. body:"*"
  152. };
  153. };
  154. rpc AddPartnerBalance(AddPartnerBalanceRequest)returns (google.protobuf.Empty){};
  155. // 获取等级对应收益表
  156. rpc GetLevelBalanceTable (google.protobuf.Empty) returns (LevelTable){
  157. option (google.api.http) = {
  158. post: "/api/partner/level/table",
  159. body:"*"
  160. };
  161. };
  162. // 接待员查询是否关注某人
  163. rpc GetPartnerIsLike (common.PersonParam) returns (common.IsLike){
  164. option (google.api.http) = {
  165. post: "/api/partner/islike",
  166. body:"*"
  167. };
  168. };
  169. // 通过类型获取表情包列表
  170. rpc FindMemeByType (common.MemeRequest) returns (common.MemeList){
  171. option (google.api.http) = {
  172. post: "/api/partner/find/meme/type",
  173. body:"*"
  174. };
  175. };
  176. // 获取对方性别的聊天话题
  177. rpc FindChatTopic (common.ListPageAndSexRequest) returns (common.ChatTopicList){
  178. option (google.api.http) = {
  179. post: "/api/partner/find/topic",
  180. body:"*"
  181. };
  182. };
  183. // 随机表情包
  184. rpc RandomMeme (common.RandomNum) returns (common.CommonTextList){
  185. option (google.api.http) = {
  186. post: "/api/partner/find/meme/random",
  187. body:"*"
  188. };
  189. };
  190. // 随机打招呼
  191. rpc RandomSwiftMessage (common.RandomNumAndSex) returns (common.CommonTextList){
  192. option (google.api.http) = {
  193. post: "/api/partner/find/topic/random",
  194. body:"*"
  195. };
  196. };
  197. // 表情包分类名
  198. rpc FindMemeTitle (google.protobuf.Empty) returns (common.MemeTitleList){
  199. option (google.api.http) = {
  200. post: "/api/partner/find/meme/title",
  201. body:"*"
  202. };
  203. };
  204. }
  205. message LevelTable{
  206. repeated LevelInfo list = 1;
  207. }
  208. message LevelInfo{
  209. int64 level = 1;// 等级
  210. int64 chatBenefit = 2;// 聊天收益
  211. int64 callBenefit = 3;// 语音通话收益
  212. string condition = 4;// 达成条件
  213. }
  214. message AddPartnerBalanceRequest{
  215. string partnerId = 1;
  216. int64 balance = 2;
  217. }
  218. message PartnerInfo{
  219. string id = 1; // id
  220. string nickname = 2;// 昵称
  221. string avatarUrl =3;// 头像链接
  222. int64 age = 4;// 年龄
  223. int64 sex = 5;// 性别
  224. string constellation = 6; // 星座
  225. int64 level = 7;// 等级
  226. repeated int64 tagList = 8; // 标签
  227. string signature = 9; // 签名
  228. string introduceVoice = 10; // 介绍语音
  229. string province = 11;// 省
  230. string city = 12;// 市
  231. string area = 13;// 区
  232. int64 partnerId = 14;// 接待员ID
  233. }
  234. message PartnerMessage{
  235. string id = 1; // id
  236. int64 lookNum = 2; // 看过我的数量
  237. int64 lookUnreadNum = 3; // 未读的看过我的数量
  238. int64 todayReceptionNum = 4;// 今日接待人数
  239. string reversionRate = 5;// 五分钟的回复率
  240. }
  241. message PartnerBalance{
  242. string id = 1; // id
  243. int64 balance = 2;// 可提现余额
  244. int64 todayProfit = 3;// 今日收益
  245. int64 level = 4;// 等级
  246. }
  247. message PartnerDBBalance{
  248. string id = 1; // id
  249. int64 level = 2;// 等级
  250. int64 chatBenefit = 3;// 聊天收益
  251. int64 callBenefit = 4;// 语音通话收益
  252. }
  253. message RandomPartnerInfo{
  254. string id = 1; // id
  255. string nickname = 2;// 昵称
  256. string avatarUrl =3;// 头像链接
  257. int64 sex = 4;// 性别
  258. }
  259. message GetRandomPartnerRequest{
  260. int64 sex = 1;// 性别
  261. }