user.proto 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927
  1. syntax = "proto3";
  2. package api.user;
  3. import "google/api/annotations.proto";
  4. //import "google/protobuf/struct.proto";
  5. import "google/protobuf/empty.proto";
  6. import "google/protobuf/struct.proto";
  7. import "api/chat/chat.proto";
  8. import "api/common/common.proto";
  9. import "api/statistics/statistics.proto";
  10. option go_package = "git.ikuban.com/server/pw-protobuf/api/user;user";
  11. option java_multiple_files = true;
  12. option java_package = "api.user";
  13. service User {
  14. // 1、获取用户详情
  15. rpc GetUserInfo (google.protobuf.Empty) returns (UserInfo){
  16. option (google.api.http) = {
  17. post: "/api/user/info",
  18. body:"*"
  19. };
  20. };
  21. rpc GetUserInfo1 (google.protobuf.Empty) returns (UserInfo){
  22. option (google.api.http) = {
  23. post: "/api/user/info1",
  24. body:"*"
  25. };
  26. };
  27. // 2、用户发送验证码
  28. rpc SendPhoneCode (common.SendPhoneCodeRequest) returns (google.protobuf.Empty){
  29. option (google.api.http) = {
  30. post: "/api/user/code/send",
  31. body:"*"
  32. };
  33. };
  34. // 3、用户验证验证码
  35. rpc CheckPhoneCode (common.CheckPhoneCodeRequest) returns (google.protobuf.Empty){
  36. option (google.api.http) = {
  37. post: "/api/user/code/check",
  38. body:"*"
  39. };
  40. };
  41. // 4、更新用户信息
  42. rpc UpdateUserInformation (common.UpdateInformationRequest) returns (google.protobuf.Empty){
  43. option (google.api.http) = {
  44. post: "/api/user/update/information",
  45. body:"*"
  46. };
  47. };
  48. // 5、创建用户与某人的关联
  49. rpc CreateUserPersonRoom (common.CreateChatRoomParam) returns (chat.RoomReply){
  50. option (google.api.http) = {
  51. post: "/api/user/create/room",
  52. body:"*"
  53. };
  54. };
  55. // 6、获取用户的金额信息
  56. rpc GetUserBalance (google.protobuf.Empty) returns (UserBalance){
  57. option (google.api.http) = {
  58. post: "/api/user/balance",
  59. body:"*"
  60. };
  61. };
  62. // 7、用户获取ta的主页信息
  63. rpc UserGetHomeInfo (common.PersonParam) returns (common.HomeInfo){
  64. option (google.api.http) = {
  65. post: "/api/user/home",
  66. body:"*"
  67. };
  68. };
  69. // 8、用户获取ta的主页访客、关注数
  70. rpc UserGetPersonLikedAndLooked (common.PersonParam) returns (common.LookedAndLikedNum){
  71. option (google.api.http) = {
  72. post: "/api/user/num",
  73. body:"*"
  74. };
  75. };
  76. // 9、查看看过我的列表
  77. rpc FindLookList (common.ListPageRequest) returns (statistics.LookAndLikeListReply){
  78. option (google.api.http) = {
  79. post: "/api/user/list/look",
  80. body:"*"
  81. };
  82. };
  83. // 11、获取标签列表
  84. rpc FindTagListBySex (common.SexReq) returns (common.TagListReply){
  85. option (google.api.http) = {
  86. post: "/api/user/list/tag",
  87. body:"*"
  88. };
  89. };
  90. // 12、获取在线列表
  91. rpc FindOnlineList (common.ListPage2Request) returns (common.RecommendPersonListReply){
  92. option (google.api.http) = {
  93. post: "/api/user/list/online",
  94. body:"*"
  95. };
  96. };
  97. // 13、七天内列表(当前会话)
  98. rpc FindWithinSevenDayRoomList (common.ListPageRequest) returns (UserFindChatListReply){
  99. option (google.api.http) = {
  100. post: "/api/user/list/chat/within",
  101. body:"*"
  102. };
  103. };
  104. // 14、七天外列表(更早的聊天记录)
  105. rpc FindOverSevenDayRoomList (common.ListPageRequest) returns (UserFindChatListReply){
  106. option (google.api.http) = {
  107. post: "/api/user/list/chat/over",
  108. body:"*"
  109. };
  110. };
  111. // 15、密友列表
  112. rpc FindCloseFriendRoomList (common.ListPageRequest) returns (UserFindChatListReply){
  113. option (google.api.http) = {
  114. post: "/api/user/list/chat/friend",
  115. body:"*"
  116. };
  117. };
  118. // 16、用户查询聊天记录
  119. rpc FindChatRecordList (common.FindChatRecordListRequest) returns (common.ChatRecordListReply){
  120. option (google.api.http) = {
  121. post: "/api/user/chat/record",
  122. body:"*"
  123. };
  124. };
  125. // 17、用户查询房间信息
  126. rpc FindChatRoomMsg (common.FindChatRoomMsgRequest) returns (common.ChatRoomMsg){
  127. option (google.api.http) = {
  128. post: "/api/user/chat/room/msg",
  129. body:"*"
  130. };
  131. };
  132. // 18、用户查询是否关注某人
  133. rpc GetUserIsLike (common.PersonParam) returns (common.IsLike){
  134. option (google.api.http) = {
  135. post: "/api/user/islike",
  136. body:"*"
  137. };
  138. };
  139. // 19、通过类型获取表情包列表
  140. rpc FindMemeByType (common.MemeRequest) returns (common.MemeList){
  141. option (google.api.http) = {
  142. post: "/api/user/find/meme/type",
  143. body:"*"
  144. };
  145. };
  146. // 20、获取对方性别的聊天话题
  147. rpc FindChatTopic (common.FindChatTopicRequest) returns (common.ChatTopicList){
  148. option (google.api.http) = {
  149. post: "/api/user/find/topic",
  150. body:"*"
  151. };
  152. };
  153. // 21、随机表情包
  154. rpc RandomMeme (common.RandomNum) returns (common.CommonTextList){
  155. option (google.api.http) = {
  156. post: "/api/user/find/meme/random",
  157. body:"*"
  158. };
  159. };
  160. // 22、随机打招呼
  161. rpc RandomSwiftMessage (common.RandomNumAndSex) returns (common.CommonTextList){
  162. option (google.api.http) = {
  163. post: "/api/user/find/topic/random",
  164. body:"*"
  165. };
  166. };
  167. // 23、表情包分类名
  168. rpc FindMemeTitle (google.protobuf.Empty) returns (common.MemeTitleList){
  169. option (google.api.http) = {
  170. post: "/api/user/find/meme/title",
  171. body:"*"
  172. };
  173. };
  174. // 24、用户获取聊天对象的资料卡片
  175. rpc UserGetChatCard(common.PersonParam) returns (common.ChatCardInfo){
  176. option (google.api.http) = {
  177. post: "/api/user/chat/card",
  178. body:"*"
  179. };
  180. };
  181. // 25、聊天话题分类名
  182. rpc FindChatTopicTitle (google.protobuf.Empty) returns (common.MemeTitleList){
  183. option (google.api.http) = {
  184. post: "/api/user/find/chat/title",
  185. body:"*"
  186. };
  187. };
  188. // 26、用户关注某人
  189. rpc UserLike(common.PersonParam) returns (google.protobuf.Empty){
  190. option (google.api.http) = {
  191. post: "/api/user/like",
  192. body:"*"
  193. };
  194. };
  195. // 27、用户取关某人
  196. rpc UserUnLike(common.PersonParam) returns (google.protobuf.Empty){
  197. option (google.api.http) = {
  198. post: "/api/user/unlike",
  199. body:"*"
  200. };
  201. };
  202. // 28、举报某人
  203. rpc Report (common.ReportChatRequest) returns (google.protobuf.Empty){
  204. option (google.api.http) = {
  205. post: "/api/user/report",
  206. body:"*"
  207. };
  208. };
  209. // 29、超过七天的头像列表
  210. rpc FindOverSevenDayAvatar (google.protobuf.Empty) returns (common.FindOverSevenDayAvatarReply){
  211. option (google.api.http) = {
  212. post: "/api/user/over/avatar/list",
  213. body:"*"
  214. };
  215. };
  216. // 30、更新上次访问的小纸条
  217. rpc UpdateLastScripID (common.UpdateLastScripIDRequest) returns (google.protobuf.Empty){
  218. option (google.api.http) = {
  219. post: "/api/user/scrip/last/update",
  220. body:"*"
  221. };
  222. };
  223. // 31、创建纸条
  224. rpc CreateScrip (CreateScripRequest) returns (common.ScripID){
  225. option (google.api.http) = {
  226. post: "/api/user/scrip/create",
  227. body:"*"
  228. };
  229. };
  230. // 32、删除纸条
  231. rpc DeleteScrip (DeleteScripRequest) returns (google.protobuf.Empty){
  232. option (google.api.http) = {
  233. post: "/api/user/scrip/delete",
  234. body:"*"
  235. };
  236. };
  237. // 33、查询自己的小纸条
  238. rpc FindMyScrip (UserFindScripRequest) returns (common.ScripReply){
  239. option (google.api.http) = {
  240. post: "/api/user/scrip/find/self",
  241. body:"*"
  242. };
  243. };
  244. // 34、查询别人的小纸条
  245. rpc FindOtherScrip (common.FindScripRequest) returns (common.ScripReply){
  246. option (google.api.http) = {
  247. post: "/api/user/scrip/find/other",
  248. body:"*"
  249. };
  250. };
  251. // 35、查询随机纸条列表
  252. rpc FindRecommendScrip (UserFindScripRequest) returns (common.ScripReply){
  253. option (google.api.http) = {
  254. post: "/api/user/scrip/find/recommend",
  255. body:"*"
  256. };
  257. };
  258. // 36、用户查看纸条
  259. rpc PersonLookScrip (PersonLookScripRequest) returns (google.protobuf.Empty){
  260. option (google.api.http) = {
  261. post: "/api/user/scrip/look",
  262. body:"*"
  263. };
  264. };
  265. // 37、用户点击回看
  266. rpc PersonClickLookBack (google.protobuf.Empty) returns (common.ScripInfo){
  267. option (google.api.http) = {
  268. post: "/api/user/scrip/look/back",
  269. body:"*"
  270. };
  271. };
  272. // 38、用户回复小纸条
  273. rpc PersonReplyScrip (ReplyScripRequest) returns (common.ChatRecordInfo){
  274. option (google.api.http) = {
  275. post: "/api/user/scrip/reply",
  276. body:"*"
  277. };
  278. };
  279. // 39、用户删除房间
  280. rpc UserDeleteChat (common.RoomIDRequest) returns (google.protobuf.Empty){
  281. option (google.api.http) = {
  282. post: "/api/user/chat/delete",
  283. body:"*"
  284. };
  285. };
  286. // 40、获取用户的总未读数
  287. rpc GetUserAllUnreadNum (google.protobuf.Empty) returns (chat.UnreadNumReply){
  288. option (google.api.http) = {
  289. post: "/api/user/chat/unread/num",
  290. body:"*"
  291. };
  292. };
  293. // 41、用户查询与某人的房间
  294. rpc GetUserRoomByPerson (common.PersonParam) returns (chat.UserRoomInfo){
  295. option (google.api.http) = {
  296. post: "/api/user/room/info",
  297. body:"*"
  298. };
  299. };
  300. // 42、查看我喜欢的列表
  301. rpc FindLikeList (common.ListPageRequest) returns (statistics.LookAndLikeListReply){
  302. option (google.api.http) = {
  303. post: "/api/user/list/like",
  304. body:"*"
  305. };
  306. };
  307. // 43、查看喜欢我的列表
  308. rpc FindLikedList (common.ListPageRequest) returns (statistics.LookAndLikeListReply){
  309. option (google.api.http) = {
  310. post: "/api/user/list/liked",
  311. body:"*"
  312. };
  313. };
  314. // 44、用户拉黑某人
  315. rpc UserSetBlackChat (common.RoomIDRequest) returns (google.protobuf.Empty){
  316. option (google.api.http) = {
  317. post: "/api/user/set/black",
  318. body:"*"
  319. };
  320. };
  321. // 45、检查用户是否与接待员关联
  322. rpc CheckUserPartnerIsRelationship (common.PartnerIDParam) returns (chat.CheckUserPartnerIsRelationshipReply){
  323. option (google.api.http) = {
  324. post: "/api/user/check/relationship",
  325. body:"*"
  326. };
  327. };
  328. // 46、获取接待员的确认通过页面信息
  329. rpc GetPartnerCircleInfo (KeyRequest) returns (common.AddFriendMessageInfo){
  330. option (google.api.http) = {
  331. post: "/api/user/circle/info",
  332. body:"*"
  333. };
  334. };
  335. // 47、获取用户的访客数以及关注数
  336. rpc GetLookAndLikeStatisticsMessage (google.protobuf.Empty) returns (statistics.LookAndLikeMessageReply){
  337. option (google.api.http) = {
  338. post: "/api/user/num/like_look",
  339. body:"*"
  340. };
  341. };
  342. // 48、获取用户访问数详情
  343. rpc GetUserLookNum (google.protobuf.Empty) returns (statistics.LookMessageReply){
  344. option (google.api.http) = {
  345. post: "/api/user/look/num",
  346. body:"*"
  347. };
  348. };
  349. // 49、用户完善资料
  350. rpc UserFinishInformation (google.protobuf.Empty) returns (google.protobuf.Empty){
  351. option (google.api.http) = {
  352. post: "/api/user/information/finish",
  353. body:"*"
  354. };
  355. };
  356. // 50、用户完善情况
  357. rpc UserInformationStatus (google.protobuf.Empty) returns (InformationStatus){
  358. option (google.api.http) = {
  359. post: "/api/user/information/status",
  360. body:"*"
  361. };
  362. };
  363. // 51、用户获取完善资料奖励
  364. rpc UserGetInformationAward(google.protobuf.Empty) returns (google.protobuf.Empty){
  365. option (google.api.http) = {
  366. post: "/api/user/information/award",
  367. body:"*"
  368. };
  369. };
  370. // 52、解锁"看过我的"的记录
  371. rpc UnlockLookRecord (common.PersonParam) returns (google.protobuf.Empty){
  372. option (google.api.http) = {
  373. post: "/api/user/look/unlock",
  374. body:"*"
  375. };
  376. };
  377. // 53、用户充值
  378. rpc UserRecharge (UserRechargeRequest) returns (PayInfo){
  379. option (google.api.http) = {
  380. post: "/api/user/recharge",
  381. body:"*"
  382. };
  383. };
  384. // 54、用户充值vip
  385. rpc UserRechargeVip (UserRechargeRequest) returns (PayInfo){
  386. option (google.api.http) = {
  387. post: "/api/user/recharge/vip",
  388. body:"*"
  389. };
  390. };
  391. // 55、充值套餐列表
  392. rpc FindRechargeList (google.protobuf.Empty) returns (RechargeList){
  393. option (google.api.http) = {
  394. post: "/api/user/recharge/list",
  395. body:"*"
  396. };
  397. };
  398. // 56、充值Vip套餐列表
  399. rpc FindVipRechargeList (google.protobuf.Empty) returns (VipRechargeList){
  400. option (google.api.http) = {
  401. post: "/api/user/recharge/vip/list",
  402. body:"*"
  403. };
  404. };
  405. // 57、用户充值记录列表
  406. rpc FindPayList (FindPayOrderListRequest) returns (PayOrderList){
  407. option (google.api.http) = {
  408. post: "/api/user/pay/list",
  409. body:"*"
  410. };
  411. };
  412. // 58、查询推荐人的列表
  413. rpc FindRecommendPersonList (google.protobuf.Empty) returns (common.RecommendPersonListReply){
  414. option (google.api.http) = {
  415. post: "/api/user/list/recommend",
  416. body:"*"
  417. };
  418. };
  419. // 59、获取匹配的头像数组以及数量
  420. rpc FindMatchingAvatarAndNum (google.protobuf.Empty) returns (FindMatchingAvatarAndNumReply){
  421. option (google.api.http) = {
  422. post: "/api/user/matching/message",
  423. body:"*"
  424. };
  425. };
  426. // 60、获取假弹窗
  427. rpc GetWindowInfo (google.protobuf.Empty) returns (chat.WindowInfo){
  428. option (google.api.http) = {
  429. post: "/api/user/chat/window/get",
  430. body:"*"
  431. };
  432. };
  433. // 61、用户的每日免费数
  434. rpc GetUserFreeNum (google.protobuf.Empty) returns (UserFreeNum){
  435. option (google.api.http) = {
  436. post: "/api/user/free/num",
  437. body:"*"
  438. };
  439. };
  440. // 62、随机速配
  441. rpc GetRandomMatching (GetRandomMatchingRequest) returns (chat.GetRandomMatchingReply){
  442. option (google.api.http) = {
  443. post: "/api/user/random/matching",
  444. body:"*"
  445. };
  446. };
  447. // 63、解锁语音扣费
  448. rpc UnlockVoice (common.RoomIDRequest) returns (google.protobuf.Empty){
  449. option (google.api.http) = {
  450. post: "/api/user/unlock/voice",
  451. body:"*"
  452. };
  453. };
  454. // 64、解锁图片扣费
  455. rpc UnlockPicture (common.RoomIDRequest) returns (google.protobuf.Empty){
  456. option (google.api.http) = {
  457. post: "/api/user/unlock/picture",
  458. body:"*"
  459. };
  460. };
  461. // 65、更新用户注册状态
  462. rpc UpdateUserIsRegister (google.protobuf.Empty) returns (google.protobuf.Empty){
  463. option (google.api.http) = {
  464. post: "/api/user/update/register",
  465. body:"*"
  466. };
  467. };
  468. // 66、创建用户与接待员的关联
  469. rpc CreateUserPartnerRoom (common.CreateChatRoomParam) returns (chat.RoomReply){
  470. option (google.api.http) = {
  471. post: "/api/user/create/room/partner",
  472. body:"*"
  473. };
  474. };
  475. // 67、用户发送消息
  476. rpc SendMessage (SendMessageRequest) returns (common.SendMessageReply){
  477. option (google.api.http) = {
  478. post: "/api/user/message/send",
  479. body:"*"
  480. };
  481. };
  482. // 68、获取用户vip信息
  483. rpc GetVipInfo (google.protobuf.Empty) returns (VipInfo){
  484. option (google.api.http) = {
  485. post: "/api/vip/info",
  486. body:"*"
  487. };
  488. };
  489. // 69、精选列表
  490. rpc FindHandpickUser (google.protobuf.Empty) returns (common.HandpickPersonListReply){
  491. option (google.api.http) = {
  492. post: "/api/handpick/list",
  493. body:"*"
  494. };
  495. };
  496. // 70、查询用户查看精选表的次数
  497. rpc GetUserLookHandPickNum (google.protobuf.Empty) returns (GetUserLookHandPickNumReply){
  498. option (google.api.http) = {
  499. post: "/api/user/look/handpick/num",
  500. body:"*"
  501. };
  502. };
  503. // 71、设置用户查看精选表的次数
  504. rpc SetUserLookHandPickNum (common.PersonIDParam) returns (google.protobuf.Empty){
  505. option (google.api.http) = {
  506. post: "/api/user/look/handpick/num/set",
  507. body:"*"
  508. };
  509. };
  510. // 72、获取用户是能否领取回归奖励
  511. rpc IsCanGetReturnReword (google.protobuf.Empty) returns (IsCanGetReturnRewordReply){
  512. option (google.api.http) = {
  513. post: "/api/user/return/reword/status",
  514. body:"*"
  515. };
  516. };
  517. // 73、用户领取回归奖励
  518. rpc UserGetReturnReword (google.protobuf.Empty) returns (google.protobuf.Empty){
  519. option (google.api.http) = {
  520. post: "/api/user/return/reword/get",
  521. body:"*"
  522. };
  523. };
  524. // 74、用户隐私状态
  525. rpc UserPrivacyStatus (google.protobuf.Empty) returns (UserPrivacyStatusInfo){
  526. option (google.api.http) = {
  527. post: "/api/user/privacy/status",
  528. body:"*"
  529. };
  530. };
  531. // 75、用户设置隐私状态
  532. rpc UserSetPrivacyStatus (UserPrivacyStatusInfo) returns (google.protobuf.Empty){
  533. option (google.api.http) = {
  534. post: "/api/user/privacy/set",
  535. body:"*"
  536. };
  537. };
  538. // 用户点赞小纸条
  539. rpc PersonStarScrip(common.ScripIdRequest) returns (common.ChatRecordInfo){
  540. option (google.api.http) = {
  541. post: "/api/user/scrip/star",
  542. body:"*"
  543. };
  544. };
  545. // 用户更新手机号
  546. rpc UpdateUserPhone (common.CheckPhoneCodeRequest) returns (google.protobuf.Empty){
  547. option (google.api.http) = {
  548. post: "/api/user/update/phone",
  549. body:"*"
  550. };
  551. };
  552. // 清除用户的未读数
  553. rpc CleanUserUnReadNum (google.protobuf.Empty) returns (google.protobuf.Empty){
  554. option (google.api.http) = {
  555. post: "/api/user/chat/clean/unread",
  556. body:"*"
  557. };
  558. };
  559. // 实名认证
  560. rpc Certification (common.CheckIdentifyRequest) returns (common.CheckIdentifyReply){
  561. option (google.api.http) = {
  562. post: "/api/user/certification",
  563. body:"*"
  564. };
  565. };
  566. // ---rpc---
  567. // 获取用户详情
  568. rpc GetUserDBMsg (common.PersonIDParam) returns (common.PersonMsg);
  569. // 通过用户IDs查看用户信息列表
  570. rpc FindUserDBList (common.PersonIDList) returns (common.PersonDBReply);
  571. // 对内更新
  572. rpc UpdateLastScripIDDB (common.UpdateLastScripIDDBRequest) returns (google.protobuf.Empty){};
  573. // 更新上次登录时间
  574. rpc UpdateUserLastLoginTime (common.PersonIDParam) returns (google.protobuf.Empty){};
  575. // 通过userID查询用户
  576. rpc GetUserDBMsgByAccountID (common.IDParam) returns (common.PersonMsg);
  577. // 获取推荐的人(new)
  578. rpc FindRecommendHighQualityUserDBList (FindRecommendHighQualityUserRequest) returns (FindRecommendHighQualityUserReply){};
  579. // 获取用户详情websocket专用
  580. rpc GetUserDBMsgFromWebsocket (common.PersonIDParam) returns (GetUserDBMsgFromWebsocketReply);
  581. // 发送消息扣费
  582. rpc SendMsgReduceCredit (SendMsgReduceCreditRequest) returns (google.protobuf.Empty);
  583. // 回看纸条扣费
  584. rpc LookBackScripReduceCredit (common.PersonParam) returns (google.protobuf.Empty);
  585. // 发纸条扣费
  586. rpc CreateScripReduceCredit (common.PersonParam) returns (google.protobuf.Empty);
  587. // 回纸条扣费
  588. rpc ReplyScripReduceCredit (common.PersonParam) returns (google.protobuf.Empty);
  589. // 匹配扣费
  590. rpc MatchingCredit (common.PersonParam) returns (google.protobuf.Empty);
  591. // 更新今日被匹配数并返回用户信息
  592. rpc UpdateUserMatchedNumAndReturnUserMsg (UpdateUserMatchedNumRequest) returns (UpdateUserMatchedNumAndReturnUserMsgReply){};
  593. // 获取未匹配的离线用户
  594. rpc GetRecommendUserDB(GetRecommendUserDBRequest) returns(common.PersonDB){}
  595. // 举报超过3次拉黑用户
  596. rpc ReportUserBlack (ReportUserBlackRequest) returns (google.protobuf.Empty){};
  597. // 用户加积分
  598. rpc AddUserCredit (AddUserCreditRequest) returns (google.protobuf.Empty){};
  599. // 用户完善情况
  600. rpc UserInformationStatusDB (common.PersonIDParam) returns (InformationStatus){};
  601. // 用户完成完善资料任务 兼容
  602. rpc UserGetInformationAwardByActivity (UserGetInformationAwardByActivityRequest) returns (UserGetInformationAwardByActivityReply){};
  603. // 获取userIDs对应的vip信息
  604. rpc FindUserVipDBList (common.PersonIDList) returns (FindUserVipListDBReply){};
  605. // 匹配不存在map中并满足条件的用户
  606. rpc MatchUserDBWithoutMap (MatchUserDBWithoutMapRequest) returns (common.PersonDB){};
  607. // 获取用户信息并判断是否初始化今日
  608. rpc GetUserDBAndInit(common.GetUserDBAndInitReq) returns (common.PersonDBDetails){};
  609. // 更新今日信息
  610. rpc UpdateToday (UpdateTodayRequest) returns (google.protobuf.Empty){};
  611. // 更新上次发送模板的时间信息
  612. rpc UpdateLastSendTemplateTime (UpdateLastSendTemplateTimeRequest) returns (google.protobuf.Empty){};
  613. // 定时移除过期vip
  614. rpc CronRemoveExpirationVip (google.protobuf.Empty) returns (google.protobuf.Empty){};
  615. }
  616. message UpdateTodayRequest{
  617. string userId = 1;
  618. int64 todaySendUnreadReminderNum = 2;
  619. int64 todaySendVisitorReminderNum = 3;
  620. }
  621. message UpdateLastSendTemplateTimeRequest{
  622. string userId = 1;
  623. int64 lastSendTemplateTime = 2;
  624. }
  625. message UserPrivacyStatusInfo{
  626. bool isCloseGreet = 1;// 是否关闭打招呼
  627. bool isCloseMatching = 2;// 是否关闭匹配到我
  628. }
  629. message IsCanGetReturnRewordReply{
  630. bool isCanGetReword = 1;
  631. }
  632. message GetRandomMatchingRequest{
  633. int64 sex = 4;// 性别
  634. string province = 7;// 省
  635. string city = 8;// 市
  636. int64 maxAge = 9;// 最大年龄
  637. int64 minAge = 10;// 最小年龄
  638. }
  639. message MatchUserDBWithoutMapRequest{
  640. map <string,bool> isMatchingMap = 1;// 已经匹配过的map
  641. string province = 2;// 省
  642. string city = 3;// 市
  643. int64 maxAge = 4;// 最大年龄
  644. int64 minAge = 5;// 最小年龄
  645. int64 sex = 6;// 性别
  646. }
  647. message GetUserLookHandPickNumReply{
  648. int64 num = 1;
  649. repeated string userIdList = 2;
  650. }
  651. message FindUserVipListDBReply{
  652. map <string,VipInfo> vipMap = 1;
  653. }
  654. message VipInfo{
  655. bool isVip = 1; // 是否是vip
  656. int64 vipLevel = 2;// vip 等级
  657. int64 growthValue = 3;// vip成长值
  658. int64 renewalTime = 4;// 会员的续费时间
  659. int64 expirationTime = 5;// 会员的到期时间
  660. int64 createTime = 6;// 会员的开始时间
  661. bool isYearVip = 7;// 是否是年费vip
  662. repeated string vipFunctions = 8;// vip功能
  663. string userId = 9;// id
  664. bool isCertification = 10;// 是否实名认证
  665. }
  666. message SendMsgReduceCreditRequest{
  667. string personID = 1; // 查询目标的ID
  668. bool isFree = 2;// 是否免费
  669. string type = 3; // 消息类型
  670. }
  671. message UserGetInformationAwardByActivityRequest{
  672. string userId = 1;
  673. int64 credit = 2;
  674. string desc = 3;
  675. }
  676. message UserGetInformationAwardByActivityReply{
  677. bool isError = 1;
  678. }
  679. message AddUserCreditRequest{
  680. string id = 1; // id
  681. int64 credit = 2;// 积分
  682. string detail = 3;
  683. }
  684. message ReportUserBlackRequest{
  685. string personId = 1;
  686. string result = 2;
  687. }
  688. message SendMessageRequest{
  689. int64 roomId = 1;// 房间ID
  690. common.Message message = 2;// 消息
  691. string msgType = 3;// 消息类型
  692. string websocketTag = 4;
  693. }
  694. message GetRecommendUserDBRequest{
  695. int64 sex = 2;
  696. repeated string personIds = 3; // 匹配过的用户
  697. }
  698. message FindRecommendHighQualityUserRequest{
  699. int64 num = 1;// 数量
  700. int64 sex = 3;
  701. string personId = 4;// ID
  702. }
  703. message FindRecommendHighQualityUserReply{
  704. repeated string personIdList =1;
  705. }
  706. message UpdateUserMatchedNumAndReturnUserMsgReply{
  707. int64 todayMatchedNum = 1;// 今日被匹配数
  708. string nickname = 2;// 昵称
  709. string avatarUrl =3;// 头像链接
  710. int64 sex = 4;// 性别
  711. int64 age = 5; // 年龄
  712. string city = 6;//城市
  713. }
  714. message GetUserDBMsgFromWebsocketReply{
  715. string id = 1; // id
  716. int64 sex = 2;// 性别
  717. int64 weight = 3;// 权重
  718. string workingStatus = 4;// 工作状态
  719. int64 todayMatchedNum = 5;// 今日被匹配数
  720. int64 age = 6;// 年龄
  721. string province = 7;// 省
  722. string city = 8;// 市
  723. }
  724. message UpdateUserMatchedNumRequest{
  725. string userId = 2;
  726. }
  727. message SendMsgReduceCreditReply{
  728. bool isSendReminder = 1;// 是否发送免费次数用完提醒
  729. }
  730. message UserFreeNum{
  731. int64 replyScripNum = 1;// 今日可免费回复纸条的次数
  732. int64 createScripNum = 2;// 今日免费创建纸条的次数
  733. int64 matchingNum = 3;// 今日免费匹配数
  734. }
  735. message ReplyScripRequest {
  736. int64 scripId = 4;// 小纸条ID
  737. common.Message message = 5;// 回复内容 只需要提供 回复小纸条的内容 或 回复小纸条的素材链接
  738. string msgType = 6;
  739. }
  740. message PersonLookScripRequest{
  741. int64 scripId = 3;// 纸条id
  742. }
  743. message UserFindScripRequest {
  744. int64 nextId = 3;
  745. int64 offset = 4;
  746. }
  747. message DeleteScripRequest {
  748. int64 scripId = 1;// 纸条id
  749. }
  750. message CreateScripRequest {
  751. string text = 1;// 纸条内容
  752. string pictureUrl = 2; // 纸条背景图
  753. string province = 3;
  754. string city = 4;
  755. }
  756. message FindMatchingAvatarAndNumReply{
  757. int64 num = 1;// 匹配人数
  758. repeated string list = 2;// 头像列表
  759. }
  760. message UserRechargeRequest{
  761. int64 RechargeTemplateId = 1;// 充值套餐ID
  762. }
  763. message RechargeList{
  764. repeated RechargeInfo list = 1;
  765. }
  766. message VipRechargeList{
  767. repeated VipRechargeInfo list = 1;
  768. }
  769. message VipRechargeInfo{
  770. int64 id = 1;
  771. string label = 2;// 标题
  772. int64 price = 3;// 价格
  773. int64 originPrice = 4;// 原价
  774. int64 averagePerDayPrice = 5;// 日常价格
  775. int64 additionalCoin = 6;// 赠送的积分
  776. string description = 7;// 描述
  777. }
  778. message RechargeInfo{
  779. int64 id = 1;
  780. int64 price = 2;
  781. int64 credit = 3;// 积分
  782. int64 giveCredit = 4;// 赠送的积分
  783. string description = 5;// 描述
  784. string title = 6;// 标题
  785. }
  786. message InformationStatus{
  787. bool isFinishInformation = 1;//是否完善资料
  788. bool isGetAward = 2;// 是否领取奖励
  789. int64 credit = 3;// 奖励的金额
  790. }
  791. message UserBalance{
  792. string id = 1; // id
  793. int64 credit = 2;// 积分
  794. }
  795. message UserFindChatListReply{
  796. repeated UserChatInfo list = 1;
  797. int64 nextId = 2;
  798. }
  799. message UserChatInfo{
  800. string personId = 2;// 用户ID
  801. int64 unreadNum = 3;// 用户未读数
  802. string lastContent = 4;// 上次发送内容
  803. int64 lastTime = 5;// 上次发送时间
  804. int64 likeability = 6;// 好感度
  805. int64 sex = 8;// 性别
  806. string avatarUrl = 9;// 头像
  807. string nickname = 10;// 昵称
  808. int64 age = 11;// 年龄
  809. int64 roomId = 12;// 房间号ID
  810. bool isVip = 15;// 是否是Vip
  811. int64 vipLevel = 16;// vip等级
  812. bool isYearVip = 17;// 是否是年费Vip
  813. repeated string vipFunctions = 18;// vip功能
  814. }
  815. message UserInfo{
  816. string id = 1; // id
  817. string nickname = 2;// 昵称
  818. string avatarUrl =3;// 头像链接
  819. int64 age = 4;// 年龄
  820. int64 sex = 5;// 性别
  821. string constellation = 6; // 星座
  822. int64 credit = 7;// 积分
  823. repeated int64 tagList = 8; // 标签
  824. string signature = 9; // 签名
  825. string introduceVoice = 10; // 介绍语音
  826. string province = 11;// 省
  827. string city = 12;// 市
  828. string area = 13;// 区
  829. int64 userId = 14;// 用户ID
  830. bool isBlack = 15;// 是否被封号
  831. bool isRegister = 16;// 是否注册
  832. int64 UpdateNicknameNum = 17;// 今日更新昵称数
  833. int64 UpdateAvatarUrlNum = 18;// 今日更新头像数
  834. int64 UpdatePicturesNum = 19; // 今日更新相册数
  835. int64 UpdateSignatureNum = 20; // 今日更新签名数
  836. string phone = 21;// 手机号
  837. }
  838. message KeyRequest{
  839. string key = 1;
  840. }
  841. message CreatePayRequest{
  842. int64 money = 1; // 支付金额 单位 分
  843. string type = 2; // 类型
  844. string openId = 3;
  845. string description = 4;
  846. string attach = 5;
  847. }
  848. message PayInfo{
  849. google.protobuf.Value payInfo = 1;
  850. int64 orderId = 2;
  851. }
  852. message PayOrderInfo{
  853. string userID = 1;
  854. int64 orderID = 2; // 订单的唯一ID
  855. int64 money = 3; // 支付金额 ,单位分
  856. string type = 4; // 类型
  857. string TransactionID = 5;
  858. string openId = 6;
  859. string description = 7;
  860. string status = 9;// 状态
  861. int64 payTime = 10;// 支付时间
  862. int64 createTime = 11;// 创建时间
  863. }
  864. message PayOrderList{
  865. repeated PayOrderInfo list = 1;
  866. int64 nextId = 2;
  867. }
  868. message FindPayOrderListRequest{
  869. int64 nextId = 1;
  870. int64 offset = 2;
  871. string status = 3;
  872. }
  873. message PayCallbackReply{
  874. bytes result = 1;
  875. }