user.proto 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966
  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 (PersonLookScripReply){
  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 GetCreditConfig (google.protobuf.Empty) returns (GetCreditConfigReply){
  567. option (google.api.http) = {
  568. post: "/api/user/credit/config",
  569. body:"*"
  570. };
  571. };
  572. // ---rpc---
  573. // 获取用户详情
  574. rpc GetUserDBMsg (common.PersonIDParam) returns (common.PersonMsg);
  575. // 通过用户IDs查看用户信息列表
  576. rpc FindUserDBList (common.PersonIDList) returns (common.PersonDBReply);
  577. // 对内更新
  578. rpc UpdateLastScripIDDB (common.UpdateLastScripIDDBRequest) returns (google.protobuf.Empty){};
  579. // 更新上次登录时间
  580. rpc UpdateUserLastLoginTime (common.PersonIDParam) returns (google.protobuf.Empty){};
  581. // 通过userID查询用户
  582. rpc GetUserDBMsgByAccountID (common.IDParam) returns (common.PersonMsg);
  583. // 获取推荐的人(new)
  584. rpc FindRecommendHighQualityUserDBList (FindRecommendHighQualityUserRequest) returns (FindRecommendHighQualityUserReply){};
  585. // 获取用户详情websocket专用
  586. rpc GetUserDBMsgFromWebsocket (common.PersonIDParam) returns (GetUserDBMsgFromWebsocketReply);
  587. // 发送消息扣费
  588. rpc SendMsgReduceCredit (SendMsgReduceCreditRequest) returns (google.protobuf.Empty);
  589. // 回看纸条扣费
  590. rpc LookBackScripReduceCredit (common.PersonParam) returns (google.protobuf.Empty);
  591. // 发纸条扣费
  592. rpc CreateScripReduceCredit (common.PersonParam) returns (google.protobuf.Empty);
  593. // 回纸条扣费
  594. rpc ReplyScripReduceCredit (common.PersonParam) returns (google.protobuf.Empty);
  595. // 匹配扣费
  596. rpc MatchingCredit (common.PersonParam) returns (google.protobuf.Empty);
  597. // 创建机器人聊天会话扣费
  598. rpc GetAIRobotCredit (common.PersonParam) returns (google.protobuf.Empty);
  599. // 机器人聊天扣费
  600. rpc AIMessageSendCredit (common.PersonParam) returns (google.protobuf.Empty);
  601. // 更新今日被匹配数并返回用户信息
  602. rpc UpdateUserMatchedNumAndReturnUserMsg (UpdateUserMatchedNumRequest) returns (UpdateUserMatchedNumAndReturnUserMsgReply){};
  603. // 获取未匹配的离线用户
  604. rpc GetRecommendUserDB(GetRecommendUserDBRequest) returns(common.PersonDB){}
  605. // 举报超过3次拉黑用户
  606. rpc ReportUserBlack (ReportUserBlackRequest) returns (google.protobuf.Empty){};
  607. // 用户加积分
  608. rpc AddUserCredit (AddUserCreditRequest) returns (google.protobuf.Empty){};
  609. // 用户完善情况
  610. rpc UserInformationStatusDB (common.PersonIDParam) returns (InformationStatus){};
  611. // 用户完成完善资料任务 兼容
  612. rpc UserGetInformationAwardByActivity (UserGetInformationAwardByActivityRequest) returns (UserGetInformationAwardByActivityReply){};
  613. // 获取userIDs对应的vip信息
  614. rpc FindUserVipDBList (common.PersonIDList) returns (FindUserVipListDBReply){};
  615. // 获取userIDs对应的vip信息
  616. rpc FindUserCertificationDBList (common.PersonIDList) returns (FindUserCertificationDBReply){};
  617. // 匹配不存在map中并满足条件的用户
  618. rpc MatchUserDBWithoutMap (MatchUserDBWithoutMapRequest) returns (common.PersonDB){};
  619. // 获取用户信息并判断是否初始化今日
  620. rpc GetUserDBAndInit(common.GetUserDBAndInitReq) returns (common.PersonDBDetails){};
  621. // 更新今日信息
  622. rpc UpdateToday (UpdateTodayRequest) returns (google.protobuf.Empty){};
  623. // 更新上次发送模板的时间信息
  624. rpc UpdateLastSendTemplateTime (UpdateLastSendTemplateTimeRequest) returns (google.protobuf.Empty){};
  625. // 定时移除过期vip
  626. rpc CronRemoveExpirationVip (google.protobuf.Empty) returns (google.protobuf.Empty){};
  627. }
  628. message GetCreditConfigReply{
  629. int64 unlockMessageCredit = 1; // 解锁信息需要的积分
  630. int64 sendMessageCredit = 2; // 发送信息需要的积分
  631. int64 lookBackScripCredit = 3; // 回看需要的积分
  632. int64 createScripNum = 4; // 每日免费创建纸条数
  633. int64 createScripCredit = 5; // 创建纸条需要的积分
  634. int64 replyScripCredit = 6; // 回复纸条需要的积分
  635. int64 replyScripNum = 7; // 每日免费回复数
  636. int64 matchingNum = 8; // 每日免费匹配数
  637. int64 matchingCredit = 9; // 匹配需要的积分
  638. int64 unlockVoiceCredit = 10; // 解锁语音需要的积分
  639. int64 unlockPictureCredit = 11; // 解锁图片需要的积分
  640. int64 finishInformationAward = 12; // 完善资料奖励
  641. int64 getAIRobotCredit = 13; // 创建ai会话
  642. int64 aiMessageSendCredit = 14; // ai发送消息
  643. }
  644. message PersonLookScripReply{
  645. bool isNextLock = 1;// 下一个小纸条是否需要解锁
  646. }
  647. message UpdateTodayRequest{
  648. string userId = 1;
  649. int64 todaySendUnreadReminderNum = 2;
  650. int64 todaySendVisitorReminderNum = 3;
  651. }
  652. message UpdateLastSendTemplateTimeRequest{
  653. string userId = 1;
  654. int64 lastSendTemplateTime = 2;
  655. }
  656. message UserPrivacyStatusInfo{
  657. bool isCloseGreet = 1;// 是否关闭打招呼
  658. bool isCloseMatching = 2;// 是否关闭匹配到我
  659. }
  660. message IsCanGetReturnRewordReply{
  661. bool isCanGetReword = 1;
  662. }
  663. message GetRandomMatchingRequest{
  664. int64 sex = 4;// 性别
  665. string province = 7;// 省
  666. string city = 8;// 市
  667. int64 maxAge = 9;// 最大年龄
  668. int64 minAge = 10;// 最小年龄
  669. }
  670. message MatchUserDBWithoutMapRequest{
  671. map <string,bool> isMatchingMap = 1;// 已经匹配过的map
  672. string province = 2;// 省
  673. string city = 3;// 市
  674. int64 maxAge = 4;// 最大年龄
  675. int64 minAge = 5;// 最小年龄
  676. int64 sex = 6;// 性别
  677. }
  678. message GetUserLookHandPickNumReply{
  679. int64 num = 1;
  680. repeated string userIdList = 2;
  681. }
  682. message FindUserVipListDBReply{
  683. map <string,VipInfo> vipMap = 1;
  684. }
  685. message FindUserCertificationDBReply{
  686. map <string,bool> certificationMap = 1;
  687. }
  688. message VipInfo{
  689. bool isVip = 1; // 是否是vip
  690. int64 vipLevel = 2;// vip 等级˚
  691. int64 growthValue = 3;// vip成长值
  692. int64 renewalTime = 4;// 会员的续费时间
  693. int64 expirationTime = 5;// 会员的到期时间˚˚
  694. int64 createTime = 6;// 会员的开始时间
  695. bool isYearVip = 7;// 是否是年费vip
  696. repeated string vipFunctions = 8;// vip功能
  697. string userId = 9;// id
  698. }
  699. message SendMsgReduceCreditRequest{
  700. string personID = 1; // 查询目标的ID
  701. bool isFree = 2;// 是否免费
  702. string type = 3; // 消息类型
  703. }
  704. message UserGetInformationAwardByActivityRequest{
  705. string userId = 1;
  706. int64 credit = 2;
  707. string desc = 3;
  708. }
  709. message UserGetInformationAwardByActivityReply{
  710. bool isError = 1;
  711. }
  712. message AddUserCreditRequest{
  713. string id = 1; // id
  714. int64 credit = 2;// 积分
  715. string detail = 3;
  716. }
  717. message ReportUserBlackRequest{
  718. string personId = 1;
  719. string result = 2;
  720. }
  721. message SendMessageRequest{
  722. int64 roomId = 1;// 房间ID
  723. common.Message message = 2;// 消息
  724. string msgType = 3;// 消息类型
  725. string websocketTag = 4;
  726. }
  727. message GetRecommendUserDBRequest{
  728. int64 sex = 2;
  729. repeated string personIds = 3; // 匹配过的用户
  730. }
  731. message FindRecommendHighQualityUserRequest{
  732. int64 num = 1;// 数量
  733. int64 sex = 3;
  734. string personId = 4;// ID
  735. }
  736. message FindRecommendHighQualityUserReply{
  737. repeated string personIdList =1;
  738. }
  739. message UpdateUserMatchedNumAndReturnUserMsgReply{
  740. int64 todayMatchedNum = 1;// 今日被匹配数
  741. string nickname = 2;// 昵称
  742. string avatarUrl =3;// 头像链接
  743. int64 sex = 4;// 性别
  744. int64 age = 5; // 年龄
  745. string city = 6;//城市
  746. }
  747. message GetUserDBMsgFromWebsocketReply{
  748. string id = 1; // id
  749. int64 sex = 2;// 性别
  750. int64 weight = 3;// 权重
  751. string workingStatus = 4;// 工作状态
  752. int64 todayMatchedNum = 5;// 今日被匹配数
  753. int64 age = 6;// 年龄
  754. string province = 7;// 省
  755. string city = 8;// 市
  756. }
  757. message UpdateUserMatchedNumRequest{
  758. string userId = 2;
  759. }
  760. message SendMsgReduceCreditReply{
  761. bool isSendReminder = 1;// 是否发送免费次数用完提醒
  762. }
  763. message UserFreeNum{
  764. int64 replyScripNum = 1;// 今日可免费回复纸条的次数
  765. int64 createScripNum = 2;// 今日免费创建纸条的次数
  766. int64 matchingNum = 3;// 今日免费匹配数
  767. }
  768. message ReplyScripRequest {
  769. int64 scripId = 4;// 小纸条ID
  770. common.Message message = 5;// 回复内容 只需要提供 回复小纸条的内容 或 回复小纸条的素材链接
  771. string msgType = 6;
  772. }
  773. message PersonLookScripRequest{
  774. int64 scripId = 3;// 纸条id
  775. }
  776. message UserFindScripRequest {
  777. int64 nextId = 3;
  778. int64 offset = 4;
  779. }
  780. message DeleteScripRequest {
  781. int64 scripId = 1;// 纸条id
  782. }
  783. message CreateScripRequest {
  784. string text = 1;// 纸条内容
  785. string pictureUrl = 2; // 纸条背景图
  786. string province = 3;
  787. string city = 4;
  788. }
  789. message FindMatchingAvatarAndNumReply{
  790. int64 num = 1;// 匹配人数
  791. repeated string list = 2;// 头像列表
  792. }
  793. message UserRechargeRequest{
  794. int64 RechargeTemplateId = 1;// 充值套餐ID
  795. }
  796. message RechargeList{
  797. repeated RechargeInfo list = 1;
  798. }
  799. message VipRechargeList{
  800. repeated VipRechargeInfo list = 1;
  801. }
  802. message VipRechargeInfo{
  803. int64 id = 1;
  804. string label = 2;// 标题
  805. int64 price = 3;// 价格
  806. int64 originPrice = 4;// 原价
  807. int64 averagePerDayPrice = 5;// 日常价格
  808. int64 additionalCoin = 6;// 赠送的积分
  809. string description = 7;// 描述
  810. }
  811. message RechargeInfo{
  812. int64 id = 1;
  813. int64 price = 2;
  814. int64 credit = 3;// 积分
  815. int64 giveCredit = 4;// 赠送的积分
  816. string description = 5;// 描述
  817. string title = 6;// 标题
  818. }
  819. message InformationStatus{
  820. bool isFinishInformation = 1;//是否完善资料
  821. bool isGetAward = 2;// 是否领取奖励
  822. int64 credit = 3;// 奖励的金额
  823. }
  824. message UserBalance{
  825. string id = 1; // id
  826. int64 credit = 2;// 积分
  827. }
  828. message UserFindChatListReply{
  829. repeated UserChatInfo list = 1;
  830. int64 nextId = 2;
  831. }
  832. message UserChatInfo{
  833. string personId = 2;// 用户ID
  834. int64 unreadNum = 3;// 用户未读数
  835. string lastContent = 4;// 上次发送内容
  836. int64 lastTime = 5;// 上次发送时间
  837. int64 likeability = 6;// 好感度
  838. int64 sex = 8;// 性别
  839. string avatarUrl = 9;// 头像
  840. string nickname = 10;// 昵称
  841. int64 age = 11;// 年龄
  842. int64 roomId = 12;// 房间号ID
  843. bool isVip = 15;// 是否是Vip
  844. int64 vipLevel = 16;// vip等级
  845. bool isYearVip = 17;// 是否是年费Vip
  846. repeated string vipFunctions = 18;// vip功能
  847. bool isCertification = 26;// 是否实名认证
  848. }
  849. message UserInfo{
  850. string id = 1; // id
  851. string nickname = 2;// 昵称
  852. string avatarUrl =3;// 头像链接
  853. int64 age = 4;// 年龄
  854. int64 sex = 5;// 性别
  855. string constellation = 6; // 星座
  856. int64 credit = 7;// 积分
  857. repeated int64 tagList = 8; // 标签
  858. string signature = 9; // 签名
  859. string introduceVoice = 10; // 介绍语音
  860. string province = 11;// 省
  861. string city = 12;// 市
  862. string area = 13;// 区
  863. int64 userId = 14;// 用户ID
  864. bool isBlack = 15;// 是否被封号
  865. bool isRegister = 16;// 是否注册
  866. int64 UpdateNicknameNum = 17;// 今日更新昵称数
  867. int64 UpdateAvatarUrlNum = 18;// 今日更新头像数
  868. int64 UpdatePicturesNum = 19; // 今日更新相册数
  869. int64 UpdateSignatureNum = 20; // 今日更新签名数
  870. string phone = 21;// 手机号
  871. bool isCertification = 28;// 是否实名认证
  872. }
  873. message KeyRequest{
  874. string key = 1;
  875. }
  876. message CreatePayRequest{
  877. int64 money = 1; // 支付金额 单位 分
  878. string type = 2; // 类型
  879. string openId = 3;
  880. string description = 4;
  881. string attach = 5;
  882. }
  883. message PayInfo{
  884. google.protobuf.Value payInfo = 1;
  885. int64 orderId = 2;
  886. }
  887. message PayOrderInfo{
  888. string userID = 1;
  889. int64 orderID = 2; // 订单的唯一ID
  890. int64 money = 3; // 支付金额 ,单位分
  891. string type = 4; // 类型
  892. string TransactionID = 5;
  893. string openId = 6;
  894. string description = 7;
  895. string status = 9;// 状态
  896. int64 payTime = 10;// 支付时间
  897. int64 createTime = 11;// 创建时间
  898. }
  899. message PayOrderList{
  900. repeated PayOrderInfo list = 1;
  901. int64 nextId = 2;
  902. }
  903. message FindPayOrderListRequest{
  904. int64 nextId = 1;
  905. int64 offset = 2;
  906. string status = 3;
  907. }
  908. message PayCallbackReply{
  909. bytes result = 1;
  910. }