user.proto 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077
  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. // 密友列表
  113. rpc FindCloseFriendRoomList (common.ListPageRequest) returns (UserFindChatListReply){
  114. option (google.api.http) = {
  115. post: "/api/user/list/chat/friend",
  116. body:"*"
  117. };
  118. };
  119. // 15、用户查询聊天记录
  120. rpc FindChatRecordList (common.FindChatRecordListRequest) returns (common.ChatRecordListReply){
  121. option (google.api.http) = {
  122. post: "/api/user/chat/record",
  123. body:"*"
  124. };
  125. };
  126. // 16、用户查询房间信息
  127. rpc FindChatRoomMsg (common.FindChatRoomMsgRequest) returns (common.ChatRoomMsg){
  128. option (google.api.http) = {
  129. post: "/api/user/chat/room/msg",
  130. body:"*"
  131. };
  132. };
  133. // 17、用户查询是否关注某人
  134. rpc GetUserIsLike (common.PersonParam) returns (common.IsLike){
  135. option (google.api.http) = {
  136. post: "/api/user/islike",
  137. body:"*"
  138. };
  139. };
  140. // 18、通过类型获取表情包列表
  141. rpc FindMemeByType (common.MemeRequest) returns (common.MemeList){
  142. option (google.api.http) = {
  143. post: "/api/user/find/meme/type",
  144. body:"*"
  145. };
  146. };
  147. // 19、获取对方性别的聊天话题
  148. rpc FindChatTopic (common.FindChatTopicRequest) returns (common.ChatTopicList){
  149. option (google.api.http) = {
  150. post: "/api/user/find/topic",
  151. body:"*"
  152. };
  153. };
  154. // 20、随机表情包
  155. rpc RandomMeme (common.RandomNum) returns (common.CommonTextList){
  156. option (google.api.http) = {
  157. post: "/api/user/find/meme/random",
  158. body:"*"
  159. };
  160. };
  161. // 21、随机打招呼
  162. rpc RandomSwiftMessage (common.RandomNumAndSex) returns (common.CommonTextList){
  163. option (google.api.http) = {
  164. post: "/api/user/find/topic/random",
  165. body:"*"
  166. };
  167. };
  168. // 22、表情包分类名
  169. rpc FindMemeTitle (google.protobuf.Empty) returns (common.MemeTitleList){
  170. option (google.api.http) = {
  171. post: "/api/user/find/meme/title",
  172. body:"*"
  173. };
  174. };
  175. // 23、用户获取聊天对象的资料卡片
  176. rpc UserGetChatCard(common.PersonParam) returns (common.ChatCardInfo){
  177. option (google.api.http) = {
  178. post: "/api/user/chat/card",
  179. body:"*"
  180. };
  181. };
  182. // 24、聊天话题分类名
  183. rpc FindChatTopicTitle (google.protobuf.Empty) returns (common.MemeTitleList){
  184. option (google.api.http) = {
  185. post: "/api/user/find/chat/title",
  186. body:"*"
  187. };
  188. };
  189. // 25、用户关注某人
  190. rpc UserLike(common.PersonParam) returns (google.protobuf.Empty){
  191. option (google.api.http) = {
  192. post: "/api/user/like",
  193. body:"*"
  194. };
  195. };
  196. // 26、用户取关某人
  197. rpc UserUnLike(common.PersonParam) returns (google.protobuf.Empty){
  198. option (google.api.http) = {
  199. post: "/api/user/unlike",
  200. body:"*"
  201. };
  202. };
  203. // 27、举报某人
  204. rpc Report (common.ReportChatRequest) returns (google.protobuf.Empty){
  205. option (google.api.http) = {
  206. post: "/api/user/report",
  207. body:"*"
  208. };
  209. };
  210. // 28、超过七天的头像列表
  211. rpc FindOverSevenDayAvatar (google.protobuf.Empty) returns (common.FindOverSevenDayAvatarReply){
  212. option (google.api.http) = {
  213. post: "/api/user/over/avatar/list",
  214. body:"*"
  215. };
  216. };
  217. // 29、更新上次访问的小纸条
  218. rpc UpdateLastScripID (common.UpdateLastScripIDRequest) returns (google.protobuf.Empty){
  219. option (google.api.http) = {
  220. post: "/api/user/scrip/last/update",
  221. body:"*"
  222. };
  223. };
  224. // 30、创建纸条
  225. rpc CreateScrip (CreateScripRequest) returns (common.ScripID){
  226. option (google.api.http) = {
  227. post: "/api/user/scrip/create",
  228. body:"*"
  229. };
  230. };
  231. // 31、删除纸条
  232. rpc DeleteScrip (DeleteScripRequest) returns (google.protobuf.Empty){
  233. option (google.api.http) = {
  234. post: "/api/user/scrip/delete",
  235. body:"*"
  236. };
  237. };
  238. // 32、查询自己的小纸条
  239. rpc FindMyScrip (UserFindScripRequest) returns (common.ScripReply){
  240. option (google.api.http) = {
  241. post: "/api/user/scrip/find/self",
  242. body:"*"
  243. };
  244. };
  245. // 33、查询别人的小纸条
  246. rpc FindOtherScrip (common.FindScripRequest) returns (common.ScripReply){
  247. option (google.api.http) = {
  248. post: "/api/user/scrip/find/other",
  249. body:"*"
  250. };
  251. };
  252. // 34、查询随机纸条列表
  253. rpc FindRecommendScrip (UserFindScripRequest) returns (common.ScripReply){
  254. option (google.api.http) = {
  255. post: "/api/user/scrip/find/recommend",
  256. body:"*"
  257. };
  258. };
  259. // 35、用户查看纸条
  260. rpc PersonLookScrip (PersonLookScripRequest) returns (google.protobuf.Empty){
  261. option (google.api.http) = {
  262. post: "/api/user/scrip/look",
  263. body:"*"
  264. };
  265. };
  266. // 36、用户点击回看
  267. rpc PersonClickLookBack (google.protobuf.Empty) returns (common.ScripInfo){
  268. option (google.api.http) = {
  269. post: "/api/user/scrip/look/back",
  270. body:"*"
  271. };
  272. };
  273. // 37、用户回复小纸条
  274. rpc PersonReplyScrip (ReplyScripRequest) returns (common.ChatRecordInfo){
  275. option (google.api.http) = {
  276. post: "/api/user/scrip/reply",
  277. body:"*"
  278. };
  279. };
  280. // 38、用户删除房间
  281. rpc UserDeleteChat (common.RoomIDRequest) returns (google.protobuf.Empty){
  282. option (google.api.http) = {
  283. post: "/api/user/chat/delete",
  284. body:"*"
  285. };
  286. };
  287. // 39、获取用户的总未读数
  288. rpc GetUserAllUnreadNum (google.protobuf.Empty) returns (chat.UnreadNumReply){
  289. option (google.api.http) = {
  290. post: "/api/user/chat/unread/num",
  291. body:"*"
  292. };
  293. };
  294. // 40、用户查询与某人的房间
  295. rpc GetUserRoomByPerson (common.PersonParam) returns (chat.UserRoomInfo){
  296. option (google.api.http) = {
  297. post: "/api/user/room/info",
  298. body:"*"
  299. };
  300. };
  301. // 41、查看我喜欢的列表
  302. rpc FindLikeList (common.ListPageRequest) returns (statistics.LookAndLikeListReply){
  303. option (google.api.http) = {
  304. post: "/api/user/list/like",
  305. body:"*"
  306. };
  307. };
  308. // 42、查看喜欢我的列表
  309. rpc FindLikedList (common.ListPageRequest) returns (statistics.LookAndLikeListReply){
  310. option (google.api.http) = {
  311. post: "/api/user/list/liked",
  312. body:"*"
  313. };
  314. };
  315. // ---还未共用---
  316. // 用户拉黑某人
  317. rpc UserSetBlackChat (common.RoomIDRequest) returns (google.protobuf.Empty){
  318. option (google.api.http) = {
  319. post: "/api/user/set/black",
  320. body:"*"
  321. };
  322. };
  323. // ---用户专用---
  324. // 检查用户是否与接待员关联
  325. rpc CheckUserPartnerIsRelationship (common.PartnerIDParam) returns (chat.CheckUserPartnerIsRelationshipReply){
  326. option (google.api.http) = {
  327. post: "/api/user/check/relationship",
  328. body:"*"
  329. };
  330. };
  331. // 获取接待员的确认通过页面信息
  332. rpc GetPartnerCircleInfo (KeyRequest) returns (common.AddFriendMessageInfo){
  333. option (google.api.http) = {
  334. post: "/api/user/circle/info",
  335. body:"*"
  336. };
  337. };
  338. // 获取用户的访客数以及关注数
  339. rpc GetLookAndLikeStatisticsMessage (google.protobuf.Empty) returns (statistics.LookAndLikeMessageReply){
  340. option (google.api.http) = {
  341. post: "/api/user/num/like_look",
  342. body:"*"
  343. };
  344. };
  345. // 获取用户访问数详情
  346. rpc GetUserLookNum (google.protobuf.Empty) returns (statistics.LookMessageReply){
  347. option (google.api.http) = {
  348. post: "/api/user/look/num",
  349. body:"*"
  350. };
  351. };
  352. // 用户完善资料
  353. rpc UserFinishInformation (google.protobuf.Empty) returns (google.protobuf.Empty){
  354. option (google.api.http) = {
  355. post: "/api/user/information/finish",
  356. body:"*"
  357. };
  358. };
  359. // 用户完善情况
  360. rpc UserInformationStatus (google.protobuf.Empty) returns (InformationStatus){
  361. option (google.api.http) = {
  362. post: "/api/user/information/status",
  363. body:"*"
  364. };
  365. };
  366. // 用户获取完善资料奖励
  367. rpc UserGetInformationAward(google.protobuf.Empty) returns (google.protobuf.Empty){
  368. option (google.api.http) = {
  369. post: "/api/user/information/award",
  370. body:"*"
  371. };
  372. };
  373. // 解锁"看过我的"的记录
  374. rpc UnlockLookRecord (common.PersonParam) returns (google.protobuf.Empty){
  375. option (google.api.http) = {
  376. post: "/api/user/look/unlock",
  377. body:"*"
  378. };
  379. };
  380. // 用户充值
  381. rpc UserRecharge (UserRechargeRequest) returns (PayInfo){
  382. option (google.api.http) = {
  383. post: "/api/user/recharge",
  384. body:"*"
  385. };
  386. };
  387. // 用户充值
  388. rpc UserRechargeVip (UserRechargeRequest) returns (PayInfo){
  389. option (google.api.http) = {
  390. post: "/api/user/recharge/vip",
  391. body:"*"
  392. };
  393. };
  394. // 充值套餐列表
  395. rpc FindRechargeList (google.protobuf.Empty) returns (RechargeList){
  396. option (google.api.http) = {
  397. post: "/api/user/recharge/list",
  398. body:"*"
  399. };
  400. };
  401. // 充值Vip套餐列表
  402. rpc FindVipRechargeList (google.protobuf.Empty) returns (VipRechargeList){
  403. option (google.api.http) = {
  404. post: "/api/user/recharge/vip/list",
  405. body:"*"
  406. };
  407. };
  408. // 用户充值记录列表
  409. rpc FindPayList (FindPayOrderListRequest) returns (PayOrderList){
  410. option (google.api.http) = {
  411. post: "/api/user/pay/list",
  412. body:"*"
  413. };
  414. };
  415. // 查询推荐人的列表
  416. rpc FindRecommendPersonList (google.protobuf.Empty) returns (common.RecommendPersonListReply){
  417. option (google.api.http) = {
  418. post: "/api/user/list/recommend",
  419. body:"*"
  420. };
  421. };
  422. // 获取匹配的头像数组以及数量
  423. rpc FindMatchingAvatarAndNum (google.protobuf.Empty) returns (FindMatchingAvatarAndNumReply){
  424. option (google.api.http) = {
  425. post: "/api/user/matching/message",
  426. body:"*"
  427. };
  428. };
  429. // 获取假弹窗
  430. rpc GetWindowInfo (google.protobuf.Empty) returns (chat.WindowInfo){
  431. option (google.api.http) = {
  432. post: "/api/user/chat/window/get",
  433. body:"*"
  434. };
  435. };
  436. // 用户的每日免费数
  437. rpc GetUserFreeNum (google.protobuf.Empty) returns (UserFreeNum){
  438. option (google.api.http) = {
  439. post: "/api/user/free/num",
  440. body:"*"
  441. };
  442. };
  443. // 随机速配
  444. rpc GetRandomMatching (GetRandomMatchingRequest) returns (chat.GetRandomMatchingReply){
  445. option (google.api.http) = {
  446. post: "/api/user/random/matching",
  447. body:"*"
  448. };
  449. };
  450. // 解锁语音扣费
  451. rpc UnlockVoice (common.RoomIDRequest) returns (google.protobuf.Empty){
  452. option (google.api.http) = {
  453. post: "/api/user/unlock/voice",
  454. body:"*"
  455. };
  456. };
  457. // 解锁图片扣费
  458. rpc UnlockPicture (common.RoomIDRequest) returns (google.protobuf.Empty){
  459. option (google.api.http) = {
  460. post: "/api/user/unlock/picture",
  461. body:"*"
  462. };
  463. };
  464. // 更新用户注册状态
  465. rpc UpdateUserIsRegister (google.protobuf.Empty) returns (google.protobuf.Empty){
  466. option (google.api.http) = {
  467. post: "/api/user/update/register",
  468. body:"*"
  469. };
  470. };
  471. // 创建用户与接待员的关联
  472. rpc CreateUserPartnerRoom (common.CreateChatRoomParam) returns (chat.RoomReply){
  473. option (google.api.http) = {
  474. post: "/api/user/create/room/partner",
  475. body:"*"
  476. };
  477. };
  478. // 用户发送消息
  479. // 发送消息
  480. rpc SendMessage (SendMessageRequest) returns (common.SendMessageReply){
  481. option (google.api.http) = {
  482. post: "/api/user/message/send",
  483. body:"*"
  484. };
  485. };
  486. rpc GetVipInfo (google.protobuf.Empty) returns (VipInfo){
  487. option (google.api.http) = {
  488. post: "/api/vip/info",
  489. body:"*"
  490. };
  491. };
  492. // 精选列表
  493. rpc FindHandpickUser (google.protobuf.Empty) returns (common.HandpickPersonListReply){
  494. option (google.api.http) = {
  495. post: "/api/handpick/list",
  496. body:"*"
  497. };
  498. };
  499. // 查询用户查看精选表的次数
  500. rpc GetUserLookHandPickNum (google.protobuf.Empty) returns (GetUserLookHandPickNumReply){
  501. option (google.api.http) = {
  502. post: "/api/user/look/handpick/num",
  503. body:"*"
  504. };
  505. };
  506. // 设置用户查看精选表的次数
  507. rpc SetUserLookHandPickNum (common.PersonIDParam) returns (google.protobuf.Empty){
  508. option (google.api.http) = {
  509. post: "/api/user/look/handpick/num/set",
  510. body:"*"
  511. };
  512. };
  513. // 获取用户是能否领取回归奖励
  514. rpc IsCanGetReturnReword (google.protobuf.Empty) returns (IsCanGetReturnRewordReply){
  515. option (google.api.http) = {
  516. post: "/api/user/return/reword/status",
  517. body:"*"
  518. };
  519. };
  520. // 用户领取回归奖励
  521. rpc UserGetReturnReword (google.protobuf.Empty) returns (google.protobuf.Empty){
  522. option (google.api.http) = {
  523. post: "/api/user/return/reword/get",
  524. body:"*"
  525. };
  526. };
  527. // 用户隐私状态
  528. rpc UserPrivacyStatus (google.protobuf.Empty) returns (UserPrivacyStatusInfo){
  529. option (google.api.http) = {
  530. post: "/api/user/privacy/status",
  531. body:"*"
  532. };
  533. };
  534. // 用户设置隐私状态
  535. rpc UserSetPrivacyStatus (UserPrivacyStatusInfo) returns (google.protobuf.Empty){
  536. option (google.api.http) = {
  537. post: "/api/user/privacy/set",
  538. body:"*"
  539. };
  540. };
  541. // ---manager---
  542. // 管理员查询用户列表
  543. rpc ManagerFindUserList (common.ManagerFindPersonListRequest) returns (common.ManagerFindPersonListReply){
  544. option (google.api.http) = {
  545. post: "/api/manager/user/list",
  546. body:"*"
  547. };
  548. };
  549. // 管理员查询完善过资料的用户列表
  550. rpc ManagerFindInformationUserList (common.ManagerFindPersonListRequest) returns (common.ManagerFindPersonListReply){
  551. option (google.api.http) = {
  552. post: "/api/manager/user/list/information",
  553. body:"*"
  554. };
  555. };
  556. // 管理员查询已审核过信息的列表
  557. rpc ManagerFindIsCheckQualityUserList (ManagerFindIsCheckQualityUserListRequest) returns (common.ManagerFindPersonListReply2){
  558. option (google.api.http) = {
  559. post: "/api/manager/user/list/ischeckquality",
  560. body:"*"
  561. };
  562. };
  563. // 管理员查询优质用户列表
  564. rpc ManagerFindHighQualityUserList (common.ManagerFindPersonListRequest) returns (common.ManagerFindPersonListReply){
  565. option (google.api.http) = {
  566. post: "/api/manager/quality/user/list",
  567. body:"*"
  568. };
  569. };
  570. // 管理员查询精选用户
  571. rpc ManagerFindCanHandpickUserList (common.ManagerFindCanHandpickUserListRequest) returns (common.ManagerFindCanHandpickUserListReply){
  572. option (google.api.http) = {
  573. post: "/api/manager/handpick/user/list",
  574. body:"*"
  575. };
  576. };
  577. // 管理员批量更新精选用户
  578. rpc ManagerSetHandpickUser (common.ManagerSetHandpickUserRequest) returns (google.protobuf.Empty){
  579. option (google.api.http) = {
  580. post: "/api/manager/handpick/user/set",
  581. body:"*"
  582. };
  583. };
  584. // 管理员更新单个精选用户
  585. rpc ManagerSetHandpickUserOne (common.ManagerSetHandpickUserOneRequest) returns (google.protobuf.Empty){
  586. option (google.api.http) = {
  587. post: "/api/manager/handpick/user/set/one",
  588. body:"*"
  589. };
  590. };
  591. // 管理员标记优质用户
  592. rpc ManagerMarkHighQualityUser (ManagerMarkHighQualityUserRequest) returns (google.protobuf.Empty){
  593. option (google.api.http) = {
  594. post: "/api/manager/quality/user/set",
  595. body:"*"
  596. };
  597. };
  598. // 管理员批量取消标记优质用户
  599. rpc ManagerReMarkHighQualityUser (ManagerReMarkHighQualityUserRequest) returns (google.protobuf.Empty){
  600. option (google.api.http) = {
  601. post: "/api/manager/quality/user/remark",
  602. body:"*"
  603. };
  604. };
  605. // 管理员标记单个优质用户
  606. rpc ManagerMarkHighQualityUserOne (common.PersonIDParam) returns (google.protobuf.Empty){
  607. option (google.api.http) = {
  608. post: "/api/manager/quality/user/set/one",
  609. body:"*"
  610. };
  611. };
  612. // 管理员批量拉黑用户
  613. rpc ManagerSetUserBlack (common.PersonIDList) returns (google.protobuf.Empty){
  614. option (google.api.http) = {
  615. post: "/api/manager/black/user/more",
  616. body:"*"
  617. };
  618. };
  619. // 管理员取消标记优质用户
  620. rpc ManagerDeleteHighQualityUser (common.PersonIDParam) returns (google.protobuf.Empty){
  621. option (google.api.http) = {
  622. post: "/api/manager/quality/user/delete",
  623. body:"*"
  624. };
  625. };
  626. // 管理员更新用户语音
  627. rpc ManagerUpdateUserVoice (common.ManagerUpdatePersonVoiceRequest) returns (google.protobuf.Empty){
  628. option (google.api.http) = {
  629. post: "/api/manager/user/Voice/update",
  630. body:"*"
  631. };
  632. };
  633. // 管理员更新用户相册
  634. rpc ManagerUpdateUserPictures (common.ManagerUpdatePersonPicturesRequest) returns (google.protobuf.Empty){
  635. option (google.api.http) = {
  636. post: "/api/manager/user/pictures/update",
  637. body:"*"
  638. };
  639. };
  640. // 管理员更新用户签名
  641. rpc ManagerUpdateUserSignature (common.ManagerUpdatePersonSignatureRequest) returns (google.protobuf.Empty){
  642. option (google.api.http) = {
  643. post: "/api/manager/user/signature/update",
  644. body:"*"
  645. };
  646. };
  647. // 管理员更新用户头像
  648. rpc ManagerUpdateUserAvatar (common.ManagerUpdatePersonAvatarRequest) returns (google.protobuf.Empty){
  649. option (google.api.http) = {
  650. post: "/api/manager/user/avatar/update",
  651. body:"*"
  652. };
  653. };
  654. // 管理员更新用户昵称
  655. rpc ManagerUpdateUserName (common.ManagerUpdatePersonNameRequest) returns (google.protobuf.Empty){
  656. option (google.api.http) = {
  657. post: "/api/manager/user/name/update",
  658. body:"*"
  659. };
  660. };
  661. // 管理员更新用户权重
  662. rpc ManagerUpdateUserWeight (common.ManagerUpdatePersonWeightRequest) returns (google.protobuf.Empty){
  663. option (google.api.http) = {
  664. post: "/api/manager/user/weight/update",
  665. body:"*"
  666. };
  667. };
  668. // 管理员更新用户是否拉黑
  669. rpc ManagerUpdateUserIsBlack (common.ManagerUpdatePersonIsBlackRequest) returns (google.protobuf.Empty){
  670. option (google.api.http) = {
  671. post: "/api/manager/user/black/update",
  672. body:"*"
  673. };
  674. };
  675. // 管理员增加用户积分
  676. rpc ManagerUpdateUserCredit (ManagerUpdateUserCreditRequest) returns (google.protobuf.Empty){
  677. option (google.api.http) = {
  678. post: "/api/manager/user/credit/add",
  679. body:"*"
  680. };
  681. };
  682. // ---rpc---
  683. // 1、获取用户详情
  684. rpc GetUserDBMsg (common.PersonIDParam) returns (common.PersonMsg);
  685. // 2、通过用户IDs查看用户信息列表
  686. rpc FindUserDBList (common.PersonIDList) returns (common.PersonDBReply);
  687. // 3、对内更新
  688. rpc UpdateLastScripIDDB (common.UpdateLastScripIDDBRequest) returns (google.protobuf.Empty){};
  689. // 5、更新上次登录时间
  690. rpc UpdateUserLastLoginTime (common.PersonIDParam) returns (google.protobuf.Empty){};
  691. // 6、通过userID查询用户
  692. rpc GetUserDBMsgByAccountID (common.IDParam) returns (common.PersonMsg);
  693. // 获取推荐的人(new)
  694. rpc FindRecommendHighQualityUserDBList (FindRecommendHighQualityUserRequest) returns (FindRecommendHighQualityUserReply){};
  695. // 获取用户详情websocket专用
  696. rpc GetUserDBMsgFromWebsocket (common.PersonIDParam) returns (GetUserDBMsgFromWebsocketReply);
  697. // 发送消息扣费
  698. rpc SendMsgReduceCredit (SendMsgReduceCreditRequest) returns (google.protobuf.Empty);
  699. // 回看纸条扣费
  700. rpc LookBackScripReduceCredit (common.PersonParam) returns (google.protobuf.Empty);
  701. // 发纸条扣费
  702. rpc CreateScripReduceCredit (common.PersonParam) returns (google.protobuf.Empty);
  703. // 回纸条扣费
  704. rpc ReplyScripReduceCredit (common.PersonParam) returns (google.protobuf.Empty);
  705. // 匹配扣费
  706. rpc MatchingCredit (common.PersonParam) returns (google.protobuf.Empty);
  707. // 未读发送模板消息
  708. rpc SendNewMessageUnreadReminder (SendNewMessageUnreadReminderRequest) returns (google.protobuf.Empty){};
  709. // 好友访问提醒
  710. rpc SendNewVisitorTemplateReminder (common.PersonIDParam) returns (google.protobuf.Empty){};
  711. // 更新今日被匹配数并返回用户信息
  712. rpc UpdateUserMatchedNumAndReturnUserMsg (UpdateUserMatchedNumRequest) returns (UpdateUserMatchedNumAndReturnUserMsgReply){};
  713. // 获取未匹配的离线用户
  714. rpc GetRecommendUserDB(GetRecommendUserDBRequest) returns(common.PersonDB){}
  715. // 举报超过3次拉黑用户
  716. rpc ReportUserBlack (ReportUserBlackRequest) returns (google.protobuf.Empty){};
  717. // 用户加积分
  718. rpc AddUserCredit (AddUserCreditRequest) returns (google.protobuf.Empty){};
  719. // 用户完善情况
  720. rpc UserInformationStatusDB (common.PersonIDParam) returns (InformationStatus){};
  721. // 用户完成完善资料任务 兼容
  722. rpc UserGetInformationAwardByActivity (UserGetInformationAwardByActivityRequest) returns (UserGetInformationAwardByActivityReply){};
  723. // 获取userIDs对应的vip信息
  724. rpc FindUserVipDBList (common.PersonIDList) returns (FindUserVipListDBReply){};
  725. // 匹配不存在map中并满足条件的用户
  726. rpc MatchUserDBWithoutMap (MatchUserDBWithoutMapRequest) returns (common.PersonDB){};
  727. // 获取用户信息并判断是否初始化今日
  728. rpc GetUserDBAndInit(common.GetUserDBAndInitReq) returns (common.PersonDBDetails){};
  729. // 更新今日信息
  730. rpc UpdateToday (UpdateTodayRequest) returns (google.protobuf.Empty){};
  731. // 更新上次发送模板的时间信息
  732. rpc UpdateLastSendTemplateTime (UpdateLastSendTemplateTimeRequest) returns (google.protobuf.Empty){};
  733. // rpc CronSignInUser (google.protobuf.Empty) returns (google.protobuf.Empty){};
  734. // rpc CronSendUnreadTemplate (google.protobuf.Empty) returns (google.protobuf.Empty){};
  735. rpc CronRemoveExpirationVip (google.protobuf.Empty) returns (google.protobuf.Empty){};
  736. }
  737. message UpdateTodayRequest{
  738. string userId = 1;
  739. int64 todaySendUnreadReminderNum = 2;
  740. int64 todaySendVisitorReminderNum = 3;
  741. }
  742. message UpdateLastSendTemplateTimeRequest{
  743. string userId = 1;
  744. int64 lastSendTemplateTime = 2;
  745. }
  746. message UserPrivacyStatusInfo{
  747. bool isCloseGreet = 1;// 是否关闭打招呼
  748. bool isCloseMatching = 2;// 是否关闭匹配到我
  749. }
  750. message IsCanGetReturnRewordReply{
  751. bool isCanGetReword = 1;
  752. }
  753. message GetRandomMatchingRequest{
  754. int64 sex = 4;// 性别
  755. string province = 7;// 省
  756. string city = 8;// 市
  757. int64 maxAge = 9;// 最大年龄
  758. int64 minAge = 10;// 最小年龄
  759. }
  760. message MatchUserDBWithoutMapRequest{
  761. map <string,bool> isMatchingMap = 1;// 已经匹配过的map
  762. string province = 2;// 省
  763. string city = 3;// 市
  764. int64 maxAge = 4;// 最大年龄
  765. int64 minAge = 5;// 最小年龄
  766. int64 sex = 6;// 性别
  767. }
  768. message GetUserLookHandPickNumReply{
  769. int64 num = 1;
  770. repeated string userIdList = 2;
  771. }
  772. message FindUserVipListDBReply{
  773. map <string,VipInfo> vipMap = 1;
  774. }
  775. message VipInfo{
  776. bool isVip = 1; // 是否是vip
  777. int64 vipLevel = 2;// vip 等级
  778. int64 growthValue = 3;// vip成长值
  779. int64 renewalTime = 4;// 会员的续费时间
  780. int64 expirationTime = 5;// 会员的到期时间
  781. int64 createTime = 6;// 会员的开始时间
  782. bool isYearVip = 7;// 是否是年费vip
  783. repeated string vipFunctions = 8;// vip功能
  784. string userId = 9;// id
  785. }
  786. message SendMsgReduceCreditRequest{
  787. string personID = 1; // 查询目标的ID
  788. bool isFree = 2;// 是否免费
  789. string type = 3; // 消息类型
  790. }
  791. message UserGetInformationAwardByActivityRequest{
  792. string userId = 1;
  793. int64 credit = 2;
  794. string desc = 3;
  795. }
  796. message UserGetInformationAwardByActivityReply{
  797. bool isError = 1;
  798. }
  799. message AddUserCreditRequest{
  800. string id = 1; // id
  801. int64 credit = 2;// 积分
  802. string detail = 3;
  803. }
  804. message ReportUserBlackRequest{
  805. string personId = 1;
  806. string result = 2;
  807. }
  808. message SendMessageRequest{
  809. int64 roomId = 1;// 房间ID
  810. common.Message message = 2;// 消息
  811. string msgType = 3;// 消息类型
  812. string websocketTag = 4;
  813. }
  814. message ManagerFindIsCheckQualityUserListRequest{
  815. int64 page = 1;
  816. int64 pageSize = 2;
  817. int64 id = 3;// 用户ID
  818. string name = 4;// 姓名
  819. int64 sex = 5; // 性别
  820. }
  821. message ManagerUpdateUserCreditRequest{
  822. string personId = 1;
  823. int64 num = 2;
  824. string title = 3;
  825. }
  826. message ManagerMarkHighQualityUserRequest{
  827. repeated string passIds = 1;
  828. repeated string unPassIds = 2;
  829. }
  830. message ManagerReMarkHighQualityUserRequest{
  831. repeated string userIds = 1;
  832. }
  833. message GetRecommendUserDBRequest{
  834. int64 sex = 2;
  835. repeated string personIds = 3; // 匹配过的用户
  836. }
  837. message FindRecommendHighQualityUserRequest{
  838. int64 num = 1;// 数量
  839. int64 sex = 3;
  840. string personId = 4;// ID
  841. }
  842. message FindRecommendHighQualityUserReply{
  843. repeated string personIdList =1;
  844. }
  845. message UpdateUserMatchedNumAndReturnUserMsgReply{
  846. int64 todayMatchedNum = 1;// 今日被匹配数
  847. string nickname = 2;// 昵称
  848. string avatarUrl =3;// 头像链接
  849. int64 sex = 4;// 性别
  850. int64 age = 5; // 年龄
  851. string city = 6;//城市
  852. }
  853. message GetUserDBMsgFromWebsocketReply{
  854. string id = 1; // id
  855. int64 sex = 2;// 性别
  856. int64 weight = 3;// 权重
  857. string workingStatus = 4;// 工作状态
  858. int64 todayMatchedNum = 5;// 今日被匹配数
  859. int64 age = 6;// 年龄
  860. string province = 7;// 省
  861. string city = 8;// 市
  862. }
  863. message UpdateUserMatchedNumRequest{
  864. string userId = 2;
  865. }
  866. message SendNewMessageUnreadReminderRequest{
  867. string personId = 1;
  868. string sendPersonId = 2;
  869. }
  870. message SendMsgReduceCreditReply{
  871. bool isSendReminder = 1;// 是否发送免费次数用完提醒
  872. }
  873. message UserFreeNum{
  874. int64 replyScripNum = 1;// 今日可免费回复纸条的次数
  875. int64 createScripNum = 2;// 今日免费创建纸条的次数
  876. int64 matchingNum = 3;// 今日免费匹配数
  877. }
  878. message ReplyScripRequest {
  879. int64 scripId = 4;// 小纸条ID
  880. common.Message message = 5;// 回复内容 只需要提供 回复小纸条的内容 或 回复小纸条的素材链接
  881. string msgType = 6;
  882. }
  883. message PersonLookScripRequest{
  884. int64 scripId = 3;// 纸条id
  885. }
  886. message UserFindScripRequest {
  887. int64 nextId = 3;
  888. int64 offset = 4;
  889. }
  890. message DeleteScripRequest {
  891. int64 scripId = 1;// 纸条id
  892. }
  893. message CreateScripRequest {
  894. string text = 1;// 纸条内容
  895. string pictureUrl = 2; // 纸条背景图
  896. }
  897. message FindMatchingAvatarAndNumReply{
  898. int64 num = 1;// 匹配人数
  899. repeated string list = 2;// 头像列表
  900. }
  901. message UserRechargeRequest{
  902. int64 RechargeTemplateId = 1;// 充值套餐ID
  903. }
  904. message RechargeList{
  905. repeated RechargeInfo list = 1;
  906. }
  907. message VipRechargeList{
  908. repeated VipRechargeInfo list = 1;
  909. }
  910. message VipRechargeInfo{
  911. int64 id = 1;
  912. string label = 2;// 标题
  913. int64 price = 3;// 价格
  914. int64 originPrice = 4;// 原价
  915. int64 averagePerDayPrice = 5;// 日常价格
  916. int64 additionalCoin = 6;// 赠送的积分
  917. string description = 7;// 描述
  918. }
  919. message RechargeInfo{
  920. int64 id = 1;
  921. int64 price = 2;
  922. int64 credit = 3;// 积分
  923. int64 giveCredit = 4;// 赠送的积分
  924. string description = 5;// 描述
  925. string title = 6;// 标题
  926. }
  927. message InformationStatus{
  928. bool isFinishInformation = 1;//是否完善资料
  929. bool isGetAward = 2;// 是否领取奖励
  930. int64 credit = 3;// 奖励的金额
  931. }
  932. message UserBalance{
  933. string id = 1; // id
  934. int64 credit = 2;// 积分
  935. }
  936. message UserFindChatListReply{
  937. repeated UserChatInfo list = 1;
  938. int64 nextId = 2;
  939. }
  940. message UserChatInfo{
  941. string personId = 2;// 用户ID
  942. int64 unreadNum = 3;// 用户未读数
  943. string lastContent = 4;// 上次发送内容
  944. int64 lastTime = 5;// 上次发送时间
  945. int64 likeability = 6;// 好感度
  946. int64 sex = 8;// 性别
  947. string avatarUrl = 9;// 头像
  948. string nickname = 10;// 昵称
  949. int64 age = 11;// 年龄
  950. int64 roomId = 12;// 房间号ID
  951. bool isVip = 15;// 是否是Vip
  952. int64 vipLevel = 16;// vip等级
  953. bool isYearVip = 17;// 是否是年费Vip
  954. repeated string vipFunctions = 18;// vip功能
  955. }
  956. message UserInfo{
  957. string id = 1; // id
  958. string nickname = 2;// 昵称
  959. string avatarUrl =3;// 头像链接
  960. int64 age = 4;// 年龄
  961. int64 sex = 5;// 性别
  962. string constellation = 6; // 星座
  963. int64 credit = 7;// 积分
  964. repeated int64 tagList = 8; // 标签
  965. string signature = 9; // 签名
  966. string introduceVoice = 10; // 介绍语音
  967. string province = 11;// 省
  968. string city = 12;// 市
  969. string area = 13;// 区
  970. int64 userId = 14;// 用户ID
  971. bool isBlack = 15;// 是否被封号
  972. bool isRegister = 16;// 是否注册
  973. int64 UpdateNicknameNum = 17;// 今日更新昵称数
  974. int64 UpdateAvatarUrlNum = 18;// 今日更新头像数
  975. int64 UpdatePicturesNum = 19; // 今日更新相册数
  976. int64 UpdateSignatureNum = 20; // 今日更新签名数
  977. }
  978. message KeyRequest{
  979. string key = 1;
  980. }
  981. message CreatePayRequest{
  982. int64 money = 1; // 支付金额 单位 分
  983. string type = 2; // 类型
  984. string openId = 3;
  985. string description = 4;
  986. string attach = 5;
  987. }
  988. message PayInfo{
  989. google.protobuf.Value payInfo = 1;
  990. int64 orderId = 2;
  991. }
  992. message PayOrderInfo{
  993. string userID = 1;
  994. int64 orderID = 2; // 订单的唯一ID
  995. int64 money = 3; // 支付金额 ,单位分
  996. string type = 4; // 类型
  997. string TransactionID = 5;
  998. string openId = 6;
  999. string description = 7;
  1000. string status = 9;// 状态
  1001. int64 payTime = 10;// 支付时间
  1002. int64 createTime = 11;// 创建时间
  1003. }
  1004. message PayOrderList{
  1005. repeated PayOrderInfo list = 1;
  1006. int64 nextId = 2;
  1007. }
  1008. message FindPayOrderListRequest{
  1009. int64 nextId = 1;
  1010. int64 offset = 2;
  1011. string status = 3;
  1012. }
  1013. message PayCallbackReply{
  1014. bytes result = 1;
  1015. }