partner.proto 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  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. // 30、创建纸条
  217. rpc CreateScrip (CreateScripRequest) returns (common.ScripID){
  218. option (google.api.http) = {
  219. post: "/api/partner/scrip/create",
  220. body:"*"
  221. };
  222. };
  223. // 31、删除纸条
  224. rpc DeleteScrip (common.ScripIdRequest) returns (google.protobuf.Empty){
  225. option (google.api.http) = {
  226. post: "/api/partner/scrip/delete",
  227. body:"*"
  228. };
  229. };
  230. // 32、查询自己的小纸条
  231. rpc FindMyScrip (common.ListPageRequest) returns (common.ScripReply){
  232. option (google.api.http) = {
  233. post: "/api/partner/scrip/find/self",
  234. body:"*"
  235. };
  236. };
  237. // 33、查询别人的小纸条
  238. rpc FindOtherScrip (common.FindScripRequest) returns (common.ScripReply){
  239. option (google.api.http) = {
  240. post: "/api/partner/scrip/find/other",
  241. body:"*"
  242. };
  243. };
  244. // 34、查询随机纸条列表
  245. rpc FindRecommendScrip (common.ListPageRequest) returns (common.ScripReply){
  246. option (google.api.http) = {
  247. post: "/api/partner/scrip/find/recommend",
  248. body:"*"
  249. };
  250. };
  251. // 35、用户查看纸条
  252. rpc PersonLookScrip (common.ScripIdRequest) returns (google.protobuf.Empty){
  253. option (google.api.http) = {
  254. post: "/api/partner/scrip/look",
  255. body:"*"
  256. };
  257. };
  258. // 36、用户点击回看
  259. rpc PersonClickLookBack (google.protobuf.Empty) returns (common.ScripInfo){
  260. option (google.api.http) = {
  261. post: "/api/partner/scrip/look/back",
  262. body:"*"
  263. };
  264. };
  265. // 37、用户回复小纸条
  266. rpc PersonReplyScrip (ReplyScripRequest) returns (common.ChatRecordInfo){
  267. option (google.api.http) = {
  268. post: "/api/partner/scrip/reply",
  269. body:"*"
  270. };
  271. };
  272. // 38、用户删除房间
  273. rpc PartnerDeleteChat (common.RoomIDRequest) returns (google.protobuf.Empty){
  274. option (google.api.http) = {
  275. post: "/api/partner/chat/delete",
  276. body:"*"
  277. };
  278. };
  279. // // 拉黑某人
  280. // rpc PartnerSetBlackChat (common.RoomIDRequest) returns (google.protobuf.Empty){
  281. // option (google.api.http) = {
  282. // post: "/api/partner/set/black",
  283. // body:"*"
  284. // };
  285. // };
  286. // ---接待员专用---
  287. // 接待员收藏某条记录
  288. rpc PartnerCollect (PartnerCollectIDsRequest) returns (google.protobuf.Empty){
  289. option (google.api.http) = {
  290. post: "/api/partner/collect",
  291. body:"*"
  292. };
  293. };
  294. // 接待员取消收藏某条记录
  295. rpc PartnerDeleteCollect (PartnerCollectRequest) returns (google.protobuf.Empty){
  296. option (google.api.http) = {
  297. post: "/api/partner/collect/delete",
  298. body:"*"
  299. };
  300. };
  301. // 查询接待员在本房间的收藏列表
  302. rpc FindChatCollectList (common.FindChatRecordListRequest) returns (common.ChatRecordListReply){
  303. option (google.api.http) = {
  304. post: "/api/partner/collect/list",
  305. body:"*"
  306. };
  307. };
  308. // 获取接待员的部分信息
  309. rpc GetPartnerMessage (google.protobuf.Empty) returns (PartnerMessage){
  310. option (google.api.http) = {
  311. post: "/api/partner/message",
  312. body:"*"
  313. };
  314. };
  315. // 获取接待员访问数详情
  316. rpc GetPartnerLookNum (google.protobuf.Empty) returns (statistics.LookMessageReply){
  317. option (google.api.http) = {
  318. post: "/api/partner/num/look",
  319. body:"*"
  320. };
  321. };
  322. // 未读列表(排队中)
  323. rpc FindUnReplyRoomList (common.ListPageRequest) returns (chat.PartnerFindRoomListReply){
  324. option (google.api.http) = {
  325. post: "/api/partner/list/chat/unreply",
  326. body:"*"
  327. };
  328. };
  329. // 获取等级对应收益表
  330. rpc GetLevelBalanceTable (google.protobuf.Empty) returns (LevelTable){
  331. option (google.api.http) = {
  332. post: "/api/partner/level/table",
  333. body:"*"
  334. };
  335. };
  336. // 接待员领取开通奖励
  337. rpc PartnerGetAward (PartnerGetAwardRequest) returns (google.protobuf.Empty){
  338. option (google.api.http) = {
  339. post: "/api/partner/chat/award",
  340. body:"*"
  341. };
  342. };
  343. // 接待员更新工作状态
  344. rpc PartnerUpdateWorkingStatus (PartnerUpdateWorkingStatusRequest) returns (google.protobuf.Empty){
  345. option (google.api.http) = {
  346. post: "/api/partner/working/status/update",
  347. body:"*"
  348. };
  349. };
  350. // 查询未处理的数据
  351. rpc FindNotReplyNum (google.protobuf.Empty) returns (chat.FindNotReplyNumReply){
  352. option (google.api.http) = {
  353. post: "/api/partner/chat/unreply/num",
  354. body:"*"
  355. };
  356. };
  357. // 接待员申请提现
  358. rpc PartnerApplyWithdraw (PartnerApplyWithdrawRequest) returns (google.protobuf.Empty){
  359. option (google.api.http) = {
  360. post: "/api/partner/withdraw",
  361. body:"*"
  362. };
  363. };
  364. // 接待员提现模板列表
  365. rpc PartnerWithdrawTemplateList (google.protobuf.Empty) returns (PartnerWithdrawTemplateListReply){
  366. option (google.api.http) = {
  367. post: "/api/partner/withdraw/template/list",
  368. body:"*"
  369. };
  370. };
  371. // 接待员提现记录列表
  372. rpc PartnerWithdrawRecordList (common.ListPageRequest) returns (PartnerWithdrawRecordListReply){
  373. option (google.api.http) = {
  374. post: "/api/partner/withdraw/record/list",
  375. body:"*"
  376. };
  377. };
  378. // 接待员获取房间收益以及今日收益
  379. rpc PartnerGetRoomBalanceAndTodayBalance (common.RoomIDRequest) returns (PartnerGetRoomBalanceAndTodayBalanceReply){
  380. option (google.api.http) = {
  381. post: "/api/partner/balance/room",
  382. body:"*"
  383. };
  384. };
  385. // ---rpc---
  386. // 1、获取用户详情
  387. rpc GetPartnerDBMsg (common.PersonIDParam) returns (common.PersonMsg);
  388. // 2、通过接待员IDs查看接待员信息列表
  389. rpc FindPartnerDBList (common.PersonIDList) returns (common.PersonDBReply);
  390. // 3、对内更新
  391. rpc UpdateLastScripIDDB (common.UpdateLastScripIDDBRequest) returns (google.protobuf.Empty){};
  392. // 4、查询推荐用户的数据
  393. rpc FindRecommendPartnerDBList (common.FindRecommendRequest) returns (common.PersonDBReply){};
  394. // 5、更新上次登录时间
  395. rpc UpdatePartnerLastLoginTime (common.PersonIDParam) returns (google.protobuf.Empty){};
  396. // 获取接待员金额
  397. rpc GetPartnerDBBalance (common.PartnerIDParam) returns (PartnerDBBalance){}
  398. // 增加接待员金额
  399. rpc AddPartnerBalance(AddPartnerBalanceRequest)returns (google.protobuf.Empty){};
  400. // 获取接待员的确认通过页面信息
  401. rpc GetPartnerCircleInfo (common.PartnerIDParam) returns (common.AddFriendMessageInfo);
  402. }
  403. message PartnerGetRoomBalanceAndTodayBalanceReply{
  404. int64 todayProfit = 1;// 今日收益
  405. int64 roomProfit = 2;// 房间收益
  406. }
  407. message PartnerCollectIDsRequest{
  408. repeated int64 chatRecordIds = 1;// 记录ID
  409. int64 roomId = 2;// 房间ID
  410. }
  411. message PartnerCollectRequest{
  412. int64 chatRecordId = 1;// 记录ID
  413. }
  414. message CreateScripRequest {
  415. string text = 1;// 纸条内容
  416. string pictureUrl = 2; // 纸条背景图
  417. }
  418. message ReplyScripRequest {
  419. int64 scripId = 4;// 小纸条ID
  420. common.Message message = 5;// 回复内容 只需要提供 回复小纸条的内容 或 回复小纸条的素材链接
  421. string msgType = 6;
  422. }
  423. message PartnerWithdrawRecordListReply{
  424. int64 nextId = 1;
  425. repeated WithdrawInfo list = 2;
  426. }
  427. message WithdrawInfo{
  428. int64 id = 1;// 记录ID
  429. int64 money = 2;// 提现多少钱
  430. int64 credit = 3;// 提现需要多少积分
  431. string status = 4;// 状态
  432. string result = 5;// 结果
  433. int64 createTime = 6;// 创建时间
  434. int64 successTime = 7;// 成功时间
  435. }
  436. message PartnerWithdrawTemplateListReply{
  437. repeated PartnerWithdrawTemplateInfo list = 1;
  438. }
  439. message PartnerWithdrawTemplateInfo {
  440. int64 id = 1;
  441. int64 money = 2;// 提现多少钱
  442. int64 credit = 3;// 提现需要多少积分
  443. string title = 4;// 提现的标题
  444. }
  445. message PartnerUpdateWorkingStatusRequest{
  446. string workingStatus = 1;// 工作状态
  447. }
  448. message PartnerGetAwardRequest{
  449. string awardType = 1;// 奖励类型
  450. string personID = 2; // 查询目标的ID
  451. string personType = 3; // 类型
  452. }
  453. message LevelTable{
  454. repeated LevelInfo list = 1;
  455. }
  456. message LevelInfo{
  457. int64 level = 1;// 等级
  458. int64 chatBenefit = 2;// 聊天收益
  459. int64 callBenefit = 3;// 语音通话收益
  460. string condition = 4;// 达成条件
  461. }
  462. message AddPartnerBalanceRequest{
  463. string partnerId = 1;
  464. int64 balance = 2;
  465. }
  466. message PartnerInfo{
  467. string id = 1; // id
  468. string nickname = 2;// 昵称
  469. string avatarUrl =3;// 头像链接
  470. int64 age = 4;// 年龄
  471. int64 sex = 5;// 性别
  472. string constellation = 6; // 星座
  473. int64 level = 7;// 等级
  474. repeated int64 tagList = 8; // 标签
  475. string signature = 9; // 签名
  476. string introduceVoice = 10; // 介绍语音
  477. string province = 11;// 省
  478. string city = 12;// 市
  479. string area = 13;// 区
  480. int64 partnerId = 14;// 接待员ID
  481. bool isBlack = 15;// 是否被封号
  482. string workingStatus = 16;// 工作状态
  483. string examineStatus = 17;// 审核状态
  484. }
  485. message PartnerMessage{
  486. string id = 1; // id
  487. int64 lookNum = 2; // 看过我的数量
  488. int64 lookUnreadNum = 3; // 未读的看过我的数量
  489. int64 todayReceptionNum = 4;// 今日接待人数
  490. string reversionRate = 5;// 五分钟的回复率
  491. }
  492. message PartnerBalance{
  493. string id = 1; // id
  494. int64 balance = 2;// 可提现余额
  495. int64 todayProfit = 3;// 今日收益
  496. int64 level = 4;// 等级
  497. int64 chatBenefit = 5;// 聊天收益
  498. int64 callBenefit = 6;// 语音通话收益
  499. string upLevelCondition = 7;// 升级条件
  500. int64 upLevelBenefit = 8;// 升级需要的收益
  501. int64 cumulativeIncome = 9;// 累计收益
  502. }
  503. message PartnerDBBalance{
  504. string id = 1; // id
  505. int64 level = 2;// 等级
  506. int64 chatBenefit = 3;// 聊天收益
  507. int64 callBenefit = 4;// 语音通话收益
  508. }
  509. message PartnerApplyWithdrawRequest{
  510. int64 templateId = 1;// 提现模板id
  511. }