partner.proto 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  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. // 1、获取接待员的个人信息
  14. rpc GetPartnerInfo (google.protobuf.Empty) returns (PartnerInfo){
  15. option (google.api.http) = {
  16. post: "/api/partner/info",
  17. body:"*"
  18. };
  19. };
  20. // 2、接待员发送验证码
  21. rpc SendPhoneCode (common.SendPhoneCodeRequest) returns (google.protobuf.Empty){
  22. option (google.api.http) = {
  23. post: "/api/partner/code/send",
  24. body:"*"
  25. };
  26. };
  27. // 3、接待员验证验证码
  28. rpc CheckPhoneCode (common.CheckPhoneCodeRequest) returns (google.protobuf.Empty){
  29. option (google.api.http) = {
  30. post: "/api/partner/code/check",
  31. body:"*"
  32. };
  33. };
  34. // 4、更新接待员的信息
  35. rpc UpdatePartnerInformation (common.UpdateInformationRequest) returns (google.protobuf.Empty){
  36. option (google.api.http) = {
  37. post: "/api/partner/update/information",
  38. body:"*"
  39. };
  40. };
  41. // 5、创建用户与接待员的关联
  42. rpc CreateUserPartnerRoom (common.CreateChatRoomParam) returns (chat.RoomReply){
  43. option (google.api.http) = {
  44. post: "/api/partner/create/room",
  45. body:"*"
  46. };
  47. };
  48. // 6、获取接待员的金额信息
  49. rpc GetPartnerBalance (google.protobuf.Empty) returns (PartnerBalance){
  50. option (google.api.http) = {
  51. post: "/api/partner/balance",
  52. body:"*"
  53. };
  54. };
  55. // 7、接待员获取ta的主页信息
  56. rpc PartnerGetHomeInfo (common.PersonParam) returns (common.HomeInfo){
  57. option (google.api.http) = {
  58. post: "/api/partner/home",
  59. body:"*"
  60. };
  61. };
  62. // 8、接待员获取ta的主页访客、关注数
  63. rpc PartnerGetPersonLikedAndLooked (common.PersonParam) returns (common.LookedAndLikedNum){
  64. option (google.api.http) = {
  65. post: "/api/partner/num",
  66. body:"*"
  67. };
  68. };
  69. // 9、查看看过我的列表
  70. rpc FindLookList (common.ListPageRequest) returns (statistics.LookAndLikeListReply){
  71. option (google.api.http) = {
  72. post: "/api/partner/list/look",
  73. body:"*"
  74. };
  75. };
  76. // 10、微信SDK初始化
  77. rpc WxConf (common.WxConfReq) returns (common.WxConfResponse){
  78. option (google.api.http) = {
  79. post: "/api/wx/jssdk/config",
  80. body:"*"
  81. };
  82. };
  83. // 11、获取标签列表
  84. rpc FindTagListBySex (common.SexReq) returns (common.TagListReply){
  85. option (google.api.http) = {
  86. post: "/api/partner/list/tag",
  87. body:"*"
  88. };
  89. };
  90. // 12、获取在线列表
  91. rpc FindOnlineList (common.ListPage2Request) returns (common.RecommendPersonListReply){
  92. option (google.api.http) = {
  93. post: "/api/partner/list/online",
  94. body:"*"
  95. };
  96. };
  97. // 13、七天内列表(当前会话)
  98. rpc FindWithinSevenDayRoomList (common.ListPageRequest) returns (chat.PartnerFindRoomListReply){
  99. option (google.api.http) = {
  100. post: "/api/partner/list/chat/within",
  101. body:"*"
  102. };
  103. };
  104. // 14、七天外列表(更早的聊天记录)
  105. rpc FindOverSevenDayRoomList (common.ListPageRequest) returns (chat.PartnerFindRoomListReply){
  106. option (google.api.http) = {
  107. post: "/api/partner/list/chat/over",
  108. body:"*"
  109. };
  110. };
  111. // 15、接待者查询聊天记录
  112. rpc FindChatRecordList (common.FindChatRecordListRequest) returns (common.ChatRecordListReply){
  113. option (google.api.http) = {
  114. post: "/api/partner/chat/record",
  115. body:"*"
  116. };
  117. };
  118. // 16、接待者查询房间信息
  119. rpc FindChatRoomMsg (common.FindChatRoomMsgRequest) returns (common.ChatRoomMsg){
  120. option (google.api.http) = {
  121. post: "/api/partner/chat/room/msg",
  122. body:"*"
  123. };
  124. };
  125. // 17、接待员查询是否关注某人
  126. rpc GetPartnerIsLike (common.PersonParam) returns (common.IsLike){
  127. option (google.api.http) = {
  128. post: "/api/partner/islike",
  129. body:"*"
  130. };
  131. };
  132. // 18、通过类型获取表情包列表
  133. rpc FindMemeByType (common.MemeRequest) returns (common.MemeList){
  134. option (google.api.http) = {
  135. post: "/api/partner/find/meme/type",
  136. body:"*"
  137. };
  138. };
  139. // 19、获取对方性别的聊天话题
  140. rpc FindChatTopic (common.FindChatTopicRequest) returns (common.ChatTopicList){
  141. option (google.api.http) = {
  142. post: "/api/partner/find/topic",
  143. body:"*"
  144. };
  145. };
  146. // 20、随机表情包
  147. rpc RandomMeme (common.RandomNum) returns (common.CommonTextList){
  148. option (google.api.http) = {
  149. post: "/api/partner/find/meme/random",
  150. body:"*"
  151. };
  152. };
  153. // 21、随机打招呼
  154. rpc RandomSwiftMessage (common.RandomNumAndSex) returns (common.CommonTextList){
  155. option (google.api.http) = {
  156. post: "/api/partner/find/topic/random",
  157. body:"*"
  158. };
  159. };
  160. // 22、表情包分类名
  161. rpc FindMemeTitle (google.protobuf.Empty) returns (common.MemeTitleList){
  162. option (google.api.http) = {
  163. post: "/api/partner/find/meme/title",
  164. body:"*"
  165. };
  166. };
  167. // 23、接待员获取聊天对象的资料卡片
  168. rpc PartnerGetChatCard(common.PersonParam) returns (common.PartnerChatCardInfo){
  169. option (google.api.http) = {
  170. post: "/api/partner/chat/card",
  171. body:"*"
  172. };
  173. };
  174. // 24、聊天话题分类名
  175. rpc FindChatTopicTitle (google.protobuf.Empty) returns (common.MemeTitleList){
  176. option (google.api.http) = {
  177. post: "/api/partner/find/chat/title",
  178. body:"*"
  179. };
  180. };
  181. // 25、接待员关注某人
  182. rpc PartnerLike(common.PersonParam) returns (google.protobuf.Empty){
  183. option (google.api.http) = {
  184. post: "/api/partner/like",
  185. body:"*"
  186. };
  187. };
  188. // 26、接待员取关某人
  189. rpc PartnerUnLike(common.PersonParam) returns (google.protobuf.Empty){
  190. option (google.api.http) = {
  191. post: "/api/partner/unlike",
  192. body:"*"
  193. };
  194. };
  195. // 27、举报某人
  196. rpc Report (common.ReportChatRequest) returns (google.protobuf.Empty){
  197. option (google.api.http) = {
  198. post: "/api/partner/report",
  199. body:"*"
  200. };
  201. };
  202. // 28、超过七天的头像列表
  203. rpc FindOverSevenDayAvatar (google.protobuf.Empty) returns (common.FindOverSevenDayAvatarReply){
  204. option (google.api.http) = {
  205. post: "/api/partner/over/avatar/list",
  206. body:"*"
  207. };
  208. };
  209. // 29、更新上次访问的小纸条
  210. rpc UpdateLastScripID (common.UpdateLastScripIDRequest) returns (google.protobuf.Empty){
  211. option (google.api.http) = {
  212. post: "/api/partner/scrip/last/update",
  213. body:"*"
  214. };
  215. };
  216. // // 拉黑某人
  217. // rpc PartnerSetBlackChat (common.RoomIDRequest) returns (google.protobuf.Empty){
  218. // option (google.api.http) = {
  219. // post: "/api/partner/set/black",
  220. // body:"*"
  221. // };
  222. // };
  223. // ---接待员专用---
  224. // 获取接待员的部分信息
  225. rpc GetPartnerMessage (google.protobuf.Empty) returns (PartnerMessage){
  226. option (google.api.http) = {
  227. post: "/api/partner/message",
  228. body:"*"
  229. };
  230. };
  231. // 获取接待员访问数详情
  232. rpc GetPartnerLookNum (google.protobuf.Empty) returns (statistics.LookMessageReply){
  233. option (google.api.http) = {
  234. post: "/api/partner/num/look",
  235. body:"*"
  236. };
  237. };
  238. // 未读列表(排队中)
  239. rpc FindUnReplyRoomList (common.ListPageRequest) returns (chat.PartnerFindRoomListReply){
  240. option (google.api.http) = {
  241. post: "/api/partner/list/chat/unreply",
  242. body:"*"
  243. };
  244. };
  245. // 获取等级对应收益表
  246. rpc GetLevelBalanceTable (google.protobuf.Empty) returns (LevelTable){
  247. option (google.api.http) = {
  248. post: "/api/partner/level/table",
  249. body:"*"
  250. };
  251. };
  252. // 接待员领取开通奖励
  253. rpc PartnerGetAward (PartnerGetAwardRequest) returns (google.protobuf.Empty){
  254. option (google.api.http) = {
  255. post: "/api/partner/chat/award",
  256. body:"*"
  257. };
  258. };
  259. // 接待员更新工作状态
  260. rpc PartnerUpdateWorkingStatus (PartnerUpdateWorkingStatusRequest) returns (google.protobuf.Empty){
  261. option (google.api.http) = {
  262. post: "/api/partner/working/status/update",
  263. body:"*"
  264. };
  265. };
  266. // 查询未处理的数据
  267. rpc FindNotReplyNum (google.protobuf.Empty) returns (chat.FindNotReplyNumReply){
  268. option (google.api.http) = {
  269. post: "/api/partner/chat/unreply/num",
  270. body:"*"
  271. };
  272. };
  273. // 接待员申请提现
  274. rpc PartnerApplyWithdraw (PartnerApplyWithdrawRequest) returns (google.protobuf.Empty){
  275. option (google.api.http) = {
  276. post: "/api/partner/withdraw",
  277. body:"*"
  278. };
  279. };
  280. // 接待员提现模板列表
  281. rpc PartnerWithdrawTemplateList (google.protobuf.Empty) returns (PartnerWithdrawTemplateListReply){
  282. option (google.api.http) = {
  283. post: "/api/partner/withdraw/template/list",
  284. body:"*"
  285. };
  286. };
  287. // 接待员提现记录列表
  288. rpc PartnerWithdrawRecordList (common.ListPageRequest) returns (PartnerWithdrawRecordListReply){
  289. option (google.api.http) = {
  290. post: "/api/partner/withdraw/record/list",
  291. body:"*"
  292. };
  293. };
  294. // ---rpc---
  295. // 1、获取用户详情
  296. rpc GetPartnerDBMsg (common.PersonIDParam) returns (common.PersonMsg);
  297. // 2、通过接待员IDs查看接待员信息列表
  298. rpc FindPartnerDBList (common.PersonIDList) returns (common.PersonDBReply);
  299. // 3、对内更新
  300. rpc UpdateLastScripIDDB (common.UpdateLastScripIDDBRequest) returns (google.protobuf.Empty){};
  301. // 4、查询推荐用户的数据
  302. rpc FindRecommendPartnerDBList (common.FindRecommendRequest) returns (common.PersonDBReply){};
  303. // 5、更新上次登录时间
  304. rpc UpdatePartnerLastLoginTime (common.PersonIDParam) returns (google.protobuf.Empty){};
  305. // 获取接待员金额
  306. rpc GetPartnerDBBalance (common.PartnerIDParam) returns (PartnerDBBalance){}
  307. // 增加接待员金额
  308. rpc AddPartnerBalance(AddPartnerBalanceRequest)returns (google.protobuf.Empty){};
  309. // 获取接待员的确认通过页面信息
  310. rpc GetPartnerCircleInfo (common.PartnerIDParam) returns (common.AddFriendMessageInfo);
  311. // 随机接待员
  312. rpc GetRandomPartnerInfo (GetRandomPartnerRequest) returns (RandomPartnerInfo);
  313. }
  314. message PartnerWithdrawRecordListReply{
  315. int64 nextId = 1;
  316. repeated WithdrawInfo list = 2;
  317. }
  318. message WithdrawInfo{
  319. int64 id = 1;// 记录ID
  320. int64 money = 2;// 提现多少钱
  321. int64 credit = 3;// 提现需要多少积分
  322. string status = 4;// 状态
  323. string result = 5;// 结果
  324. int64 createTime = 6;// 创建时间
  325. int64 successTime = 7;// 成功时间
  326. }
  327. message PartnerWithdrawTemplateListReply{
  328. repeated PartnerWithdrawTemplateInfo list = 1;
  329. }
  330. message PartnerWithdrawTemplateInfo {
  331. int64 id = 1;
  332. int64 money = 2;// 提现多少钱
  333. int64 credit = 3;// 提现需要多少积分
  334. string title = 4;// 提现的标题
  335. }
  336. message PartnerUpdateWorkingStatusRequest{
  337. string workingStatus = 1;// 工作状态
  338. }
  339. message PartnerGetAwardRequest{
  340. string awardType = 1;// 奖励类型
  341. string personID = 2; // 查询目标的ID
  342. string personType = 3; // 类型
  343. }
  344. message LevelTable{
  345. repeated LevelInfo list = 1;
  346. }
  347. message LevelInfo{
  348. int64 level = 1;// 等级
  349. int64 chatBenefit = 2;// 聊天收益
  350. int64 callBenefit = 3;// 语音通话收益
  351. string condition = 4;// 达成条件
  352. }
  353. message AddPartnerBalanceRequest{
  354. string partnerId = 1;
  355. int64 balance = 2;
  356. }
  357. message PartnerInfo{
  358. string id = 1; // id
  359. string nickname = 2;// 昵称
  360. string avatarUrl =3;// 头像链接
  361. int64 age = 4;// 年龄
  362. int64 sex = 5;// 性别
  363. string constellation = 6; // 星座
  364. int64 level = 7;// 等级
  365. repeated int64 tagList = 8; // 标签
  366. string signature = 9; // 签名
  367. string introduceVoice = 10; // 介绍语音
  368. string province = 11;// 省
  369. string city = 12;// 市
  370. string area = 13;// 区
  371. int64 partnerId = 14;// 接待员ID
  372. bool isBlack = 15;// 是否被封号
  373. string workingStatus = 16;// 工作状态
  374. }
  375. message PartnerMessage{
  376. string id = 1; // id
  377. int64 lookNum = 2; // 看过我的数量
  378. int64 lookUnreadNum = 3; // 未读的看过我的数量
  379. int64 todayReceptionNum = 4;// 今日接待人数
  380. string reversionRate = 5;// 五分钟的回复率
  381. }
  382. message PartnerBalance{
  383. string id = 1; // id
  384. int64 balance = 2;// 可提现余额
  385. int64 todayProfit = 3;// 今日收益
  386. int64 level = 4;// 等级
  387. }
  388. message PartnerDBBalance{
  389. string id = 1; // id
  390. int64 level = 2;// 等级
  391. int64 chatBenefit = 3;// 聊天收益
  392. int64 callBenefit = 4;// 语音通话收益
  393. }
  394. message RandomPartnerInfo{
  395. string id = 1; // id
  396. string nickname = 2;// 昵称
  397. string avatarUrl =3;// 头像链接
  398. int64 sex = 4;// 性别
  399. }
  400. message GetRandomPartnerRequest{
  401. int64 sex = 1;// 性别
  402. }
  403. message PartnerApplyWithdrawRequest{
  404. int64 templateId = 1;// 提现模板id
  405. }