user.proto 25 KB

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