partner.proto 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  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.CreateChatRoomParam) 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.RecommendPersonListReply){
  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.FindChatTopicRequest) 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. rpc PartnerGetChatCard(common.PersonParam) returns (common.PartnerChatCardInfo){
  206. option (google.api.http) = {
  207. post: "/api/partner/chat/card",
  208. body:"*"
  209. };
  210. };
  211. // 聊天话题分类名
  212. rpc FindChatTopicTitle (google.protobuf.Empty) returns (common.MemeTitleList){
  213. option (google.api.http) = {
  214. post: "/api/partner/find/chat/title",
  215. body:"*"
  216. };
  217. };
  218. // 接待员关注某人
  219. rpc PartnerLike(common.PersonParam) returns (google.protobuf.Empty){
  220. option (google.api.http) = {
  221. post: "/api/partner/like",
  222. body:"*"
  223. };
  224. };
  225. // 接待员取关某人
  226. rpc PartnerUnLike(common.PersonParam) returns (google.protobuf.Empty){
  227. option (google.api.http) = {
  228. post: "/api/partner/unlike",
  229. body:"*"
  230. };
  231. };
  232. // 举报某人
  233. rpc Report (common.ReportChatRequest) returns (google.protobuf.Empty){
  234. option (google.api.http) = {
  235. post: "/api/partner/report",
  236. body:"*"
  237. };
  238. };
  239. // // 拉黑某人
  240. // rpc PartnerSetBlackChat (common.RoomIDRequest) returns (google.protobuf.Empty){
  241. // option (google.api.http) = {
  242. // post: "/api/partner/set/black",
  243. // body:"*"
  244. // };
  245. // };
  246. // 接待员领取开通奖励
  247. rpc PartnerGetAward (PartnerGetAwardRequest) returns (google.protobuf.Empty){
  248. option (google.api.http) = {
  249. post: "/api/partner/chat/award",
  250. body:"*"
  251. };
  252. };
  253. // 接待员更新工作状态
  254. rpc PartnerUpdateWorkingStatus (PartnerUpdateWorkingStatusRequest) returns (google.protobuf.Empty){
  255. option (google.api.http) = {
  256. post: "/api/partner/working/status/update",
  257. body:"*"
  258. };
  259. };
  260. // 查询推荐用户的数据
  261. rpc FindRecommendPartnerDBList (common.FindRecommendRequest) returns (common.PersonDBReply){};
  262. // 超过七天的头像列表
  263. rpc FindOverSevenDayAvatar (google.protobuf.Empty) returns (common.FindOverSevenDayAvatarReply){
  264. option (google.api.http) = {
  265. post: "/api/partner/over/avatar/list",
  266. body:"*"
  267. };
  268. };
  269. // 查询未处理的数据
  270. rpc FindNotReplyNum (google.protobuf.Empty) returns (chat.FindNotReplyNumReply){
  271. option (google.api.http) = {
  272. post: "/api/partner/chat/unreply/num",
  273. body:"*"
  274. };
  275. };
  276. // 接待员申请提现
  277. rpc PartnerApplyWithdraw (PartnerApplyWithdrawRequest) returns (google.protobuf.Empty){
  278. option (google.api.http) = {
  279. post: "/api/partner/withdraw",
  280. body:"*"
  281. };
  282. };
  283. // 接待员提现模板列表
  284. rpc PartnerWithdrawTemplateList (google.protobuf.Empty) returns (PartnerWithdrawTemplateListReply){
  285. option (google.api.http) = {
  286. post: "/api/partner/withdraw/template/list",
  287. body:"*"
  288. };
  289. };
  290. // 接待员提现记录列表
  291. rpc PartnerWithdrawRecordList (common.ListPageRequest) returns (PartnerWithdrawRecordListReply){
  292. option (google.api.http) = {
  293. post: "/api/partner/withdraw/record/list",
  294. body:"*"
  295. };
  296. };
  297. }
  298. message PartnerWithdrawRecordListReply{
  299. int64 nextId = 1;
  300. repeated WithdrawInfo list = 2;
  301. }
  302. message WithdrawInfo{
  303. int64 id = 1;// 记录ID
  304. int64 money = 2;// 提现多少钱
  305. int64 credit = 3;// 提现需要多少积分
  306. string status = 4;// 状态
  307. string result = 5;// 结果
  308. }
  309. message PartnerWithdrawTemplateListReply{
  310. repeated PartnerWithdrawTemplateInfo list = 1;
  311. }
  312. message PartnerWithdrawTemplateInfo {
  313. int64 id = 1;
  314. int64 money = 2;// 提现多少钱
  315. int64 credit = 3;// 提现需要多少积分
  316. string title = 4;// 提现的标题
  317. }
  318. message PartnerUpdateWorkingStatusRequest{
  319. string workingStatus = 1;// 工作状态
  320. }
  321. message PartnerGetAwardRequest{
  322. string awardType = 1;// 奖励类型
  323. string personID = 2; // 查询目标的ID
  324. string personType = 3; // 类型
  325. }
  326. message LevelTable{
  327. repeated LevelInfo list = 1;
  328. }
  329. message LevelInfo{
  330. int64 level = 1;// 等级
  331. int64 chatBenefit = 2;// 聊天收益
  332. int64 callBenefit = 3;// 语音通话收益
  333. string condition = 4;// 达成条件
  334. }
  335. message AddPartnerBalanceRequest{
  336. string partnerId = 1;
  337. int64 balance = 2;
  338. }
  339. message PartnerInfo{
  340. string id = 1; // id
  341. string nickname = 2;// 昵称
  342. string avatarUrl =3;// 头像链接
  343. int64 age = 4;// 年龄
  344. int64 sex = 5;// 性别
  345. string constellation = 6; // 星座
  346. int64 level = 7;// 等级
  347. repeated int64 tagList = 8; // 标签
  348. string signature = 9; // 签名
  349. string introduceVoice = 10; // 介绍语音
  350. string province = 11;// 省
  351. string city = 12;// 市
  352. string area = 13;// 区
  353. int64 partnerId = 14;// 接待员ID
  354. bool isBlack = 15;// 是否被封号
  355. string workingStatus = 16;// 工作状态
  356. }
  357. message PartnerMessage{
  358. string id = 1; // id
  359. int64 lookNum = 2; // 看过我的数量
  360. int64 lookUnreadNum = 3; // 未读的看过我的数量
  361. int64 todayReceptionNum = 4;// 今日接待人数
  362. string reversionRate = 5;// 五分钟的回复率
  363. }
  364. message PartnerBalance{
  365. string id = 1; // id
  366. int64 balance = 2;// 可提现余额
  367. int64 todayProfit = 3;// 今日收益
  368. int64 level = 4;// 等级
  369. }
  370. message PartnerDBBalance{
  371. string id = 1; // id
  372. int64 level = 2;// 等级
  373. int64 chatBenefit = 3;// 聊天收益
  374. int64 callBenefit = 4;// 语音通话收益
  375. }
  376. message RandomPartnerInfo{
  377. string id = 1; // id
  378. string nickname = 2;// 昵称
  379. string avatarUrl =3;// 头像链接
  380. int64 sex = 4;// 性别
  381. }
  382. message GetRandomPartnerRequest{
  383. int64 sex = 1;// 性别
  384. }
  385. message PartnerApplyWithdrawRequest{
  386. int64 templateId = 1;// 提现模板id
  387. }