syntax = "proto3"; package api.user; import "google/api/annotations.proto"; //import "google/protobuf/struct.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/struct.proto"; import "api/chat/chat.proto"; import "api/common/common.proto"; import "api/statistics/statistics.proto"; option go_package = "git.ikuban.com/server/pw-protobuf/api/user;user"; option java_multiple_files = true; option java_package = "api.user"; service User { // 更新用户信息 rpc UpdateUserInformation (common.UpdateInformationRequest) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/user/update/information", body:"*" }; }; // 获取用户详情 rpc GetUserInfo (google.protobuf.Empty) returns (UserInfo){ option (google.api.http) = { post: "/api/user/info", body:"*" }; }; // 获取用户详情 rpc GetUserDBMsg (common.PersonIDParam) returns (common.PersonMsg); // 用户发送验证码 rpc SendPhoneCode (common.SendPhoneCodeRequest) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/user/code/send", body:"*" }; }; // 用户验证验证码 rpc CheckPhoneCode (common.CheckPhoneCodeRequest) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/user/code/check", body:"*" }; }; // 检查用户是否与接待员关联 rpc CheckUserPartnerIsRelationship (common.PartnerIDParam) returns (chat.CheckUserPartnerIsRelationshipReply){ option (google.api.http) = { post: "/api/user/check/relationship", body:"*" }; }; // 创建用户与接待员的关联 rpc CreateUserPersonRoom (common.CreateChatRoomParam) returns (chat.RoomReply){ option (google.api.http) = { post: "/api/user/create/room", body:"*" }; }; // 获取接待员的确认通过页面信息 rpc GetPartnerCircleInfo (KeyRequest) returns (common.AddFriendMessageInfo){ option (google.api.http) = { post: "/api/user/circle/info", body:"*" }; }; // 用户获取主页信息 rpc UserGetHomeInfo (common.PersonParam) returns (common.HomeInfo){ option (google.api.http) = { post: "/api/user/home", body:"*" }; }; // 通过用户IDs查看用户信息列表 rpc FindUserDBList (common.PersonIDList) returns (common.PersonDBReply); // 查看看过我的列表 rpc FindLookList (common.ListPageRequest) returns (statistics.LookAndLikeListReply){ option (google.api.http) = { post: "/api/user/list/look", body:"*" }; }; // 查看我喜欢的列表 rpc FindLikeList (common.ListPageRequest) returns (statistics.LookAndLikeListReply){ option (google.api.http) = { post: "/api/user/list/like", body:"*" }; }; // 查看喜欢我的列表 rpc FindLikedList (common.ListPageRequest) returns (statistics.LookAndLikeListReply){ option (google.api.http) = { post: "/api/user/list/liked", body:"*" }; }; // 获取用户的访客数以及关注数 rpc GetLookAndLikeStatisticsMessage (google.protobuf.Empty) returns (statistics.LookAndLikeMessageReply){ option (google.api.http) = { post: "/api/user/num/like_look", body:"*" }; }; // 微信SDK初始化 rpc WxConf (common.WxConfReq) returns (common.WxConfResponse){ option (google.api.http) = { post: "/api/wx/jssdk/config", body:"*" }; }; // 获取标签列表 rpc FindTagListBySex (common.SexReq) returns (common.TagListReply){ option (google.api.http) = { post: "/api/user/list/tag", body:"*" }; }; // 获取在线列表 rpc FindOnlineList (common.ListPage2Request) returns (common.RecommendPersonListReply){ option (google.api.http) = { post: "/api/user/list/online", body:"*" }; }; // 七天内列表(当前会话) rpc FindWithinSevenDayRoomList (common.ListPageRequest) returns (UserFindChatListReply){ option (google.api.http) = { post: "/api/user/list/chat/within", body:"*" }; }; // 七天外列表(更早的聊天记录) rpc FindOverSevenDayRoomList (common.ListPageRequest) returns (UserFindChatListReply){ option (google.api.http) = { post: "/api/user/list/chat/over", body:"*" }; }; // 用户获取ta的主页访客、关注数 rpc UserGetPersonLikedAndLooked (common.PersonParam) returns (common.LookedAndLikedNum){ option (google.api.http) = { post: "/api/user/num", body:"*" }; }; // 获取用户的金额信息 rpc GetUserBalance (google.protobuf.Empty) returns (UserBalance){ option (google.api.http) = { post: "/api/user/balance", body:"*" }; }; // 获取用户访问数详情 rpc GetUserLookNum (google.protobuf.Empty) returns (statistics.LookMessageReply){ option (google.api.http) = { post: "/api/user/look/num", body:"*" }; }; // 用户查询聊天记录 rpc FindChatRecordList (common.FindChatRecordListRequest) returns (common.ChatRecordListReply){ option (google.api.http) = { post: "/api/user/chat/record", body:"*" }; }; // 用户查询房间信息 rpc FindChatRoomMsg (common.FindChatRoomMsgRequest) returns (common.ChatRoomMsg){ option (google.api.http) = { post: "/api/user/chat/room/msg", body:"*" }; }; // 用户查询是否关注某人 rpc GetUserIsLike (common.PersonParam) returns (common.IsLike){ option (google.api.http) = { post: "/api/user/islike", body:"*" }; }; // 用户完善资料 rpc UserFinishInformation (google.protobuf.Empty) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/user/information/finish", body:"*" }; }; // 用户完善情况 rpc UserInformationStatus (google.protobuf.Empty) returns (InformationStatus){ option (google.api.http) = { post: "/api/user/information/status", body:"*" }; }; // 用户获取完善资料奖励 rpc UserGetInformationAward(google.protobuf.Empty) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/user/information/award", body:"*" }; }; // 用户获取聊天对象的资料卡片 rpc UserGetChatCard(common.PersonParam) returns (common.ChatCardInfo){ option (google.api.http) = { post: "/api/user/chat/card", body:"*" }; }; // 用户关注某人 rpc UserLike(common.PersonParam) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/user/like", body:"*" }; }; // 用户取关某人 rpc UserUnLike(common.PersonParam) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/user/unlike", body:"*" }; }; // 解锁"看过我的"的记录 rpc UnlockLookRecord (common.PersonParam) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/user/look/unlock", body:"*" }; }; rpc SendMsgReduceCredit (common.PersonParam) returns (google.protobuf.Empty); // 通过类型获取表情包列表 rpc FindMemeByType (common.MemeRequest) returns (common.MemeList){ option (google.api.http) = { post: "/api/user/find/meme/type", body:"*" }; }; // 获取对方性别的聊天话题 rpc FindChatTopic (common.FindChatTopicRequest) returns (common.ChatTopicList){ option (google.api.http) = { post: "/api/user/find/topic", body:"*" }; }; // 随机表情包 rpc RandomMeme (common.RandomNum) returns (common.CommonTextList){ option (google.api.http) = { post: "/api/user/find/meme/random", body:"*" }; }; // 随机打招呼 rpc RandomSwiftMessage (common.RandomNumAndSex) returns (common.CommonTextList){ option (google.api.http) = { post: "/api/user/find/topic/random", body:"*" }; }; // 表情包分类名 rpc FindMemeTitle (google.protobuf.Empty) returns (common.MemeTitleList){ option (google.api.http) = { post: "/api/user/find/meme/title", body:"*" }; }; // 用户拉黑某人 rpc UserSetBlackChat (common.RoomIDRequest) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/user/set/black", body:"*" }; }; // 用户删除房间 rpc UserDeleteChat (common.RoomIDRequest) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/user/chat/delete", body:"*" }; }; // 聊天话题分类名 rpc FindChatTopicTitle (google.protobuf.Empty) returns (common.MemeTitleList){ option (google.api.http) = { post: "/api/user/find/chat/title", body:"*" }; }; // 用户充值 rpc UserRecharge (UserRechargeRequest) returns (PayInfo){ option (google.api.http) = { post: "/api/user/recharge", body:"*" }; }; // 充值套餐列表 rpc FindRechargeList (google.protobuf.Empty) returns (RechargeList){ option (google.api.http) = { post: "/api/user/recharge/list", body:"*" }; }; // 用户充值记录列表 rpc FindPayList (FindPayOrderListRequest) returns (PayOrderList){ option (google.api.http) = { post: "/api/user/pay/list", body:"*" }; }; // 举报某人 rpc Report (common.ReportChatRequest) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/user/report", body:"*" }; }; // 查询推荐用户的数据 rpc FindRecommendUserDBList (common.FindRecommendRequest) returns (common.PersonDBReply){}; // 查询推荐人的列表 rpc FindRecommendPersonList (FindRecommendPersonListRequest) returns (common.RecommendPersonListReply){ option (google.api.http) = { post: "/api/user/list/recommend", body:"*" }; }; // 超过七天的头像列表 rpc FindOverSevenDayAvatar (google.protobuf.Empty) returns (common.FindOverSevenDayAvatarReply){ option (google.api.http) = { post: "/api/user/over/avatar/list", body:"*" }; }; // 获取匹配的头像数组以及数量 rpc FindMatchingAvatarAndNum (google.protobuf.Empty) returns (FindMatchingAvatarAndNumReply){ option (google.api.http) = { post: "/api/user/matching/message", body:"*" }; }; } message FindMatchingAvatarAndNumReply{ int64 num = 1;// 匹配人数 repeated string list = 2;// 头像列表 } message FindRecommendPersonListRequest{ string nextId = 1; int64 offset = 2; int64 sex = 5;// 性别(不筛选就是0) } message UserRechargeRequest{ int64 RechargeTemplateId = 1;// 充值套餐ID } message RechargeList{ repeated RechargeInfo list = 1; } message RechargeInfo{ int64 id = 1; int64 price = 2; int64 credit = 3;// 积分 int64 giveCredit = 4;// 赠送的积分 string description = 5;// 描述 string title = 6;// 标题 } message InformationStatus{ bool isFinishInformation = 1;//是否完善资料 bool isGetAward = 2;// 是否领取奖励 } message UserBalance{ string id = 1; // id int64 credit = 2;// 积分 } message UserFindChatListReply{ repeated UserChatInfo list = 1; int64 nextId = 2; } message UserChatInfo{ string personId = 2;// 用户ID int64 unreadNum = 3;// 用户未读数 string lastContent = 4;// 上次发送内容 int64 lastTime = 5;// 上次发送时间 int64 likeability = 6;// 好感度 int64 sex = 8;// 性别 string avatarUrl = 9;// 头像 string nickname = 10;// 昵称 int64 age = 11;// 年龄 int64 roomId = 12;// 房间号ID } message UserInfo{ string id = 1; // id string nickname = 2;// 昵称 string avatarUrl =3;// 头像链接 int64 age = 4;// 年龄 int64 sex = 5;// 性别 string constellation = 6; // 星座 int64 credit = 7;// 积分 repeated int64 tagList = 8; // 标签 string signature = 9; // 签名 string introduceVoice = 10; // 介绍语音 string province = 11;// 省 string city = 12;// 市 string area = 13;// 区 int64 userId = 14;// 用户ID bool isBlack = 15;// 是否被封号 } message KeyRequest{ string key = 1; } message CreatePayRequest{ int64 money = 1; // 支付金额 单位 分 string type = 2; // 类型 string openId = 3; string description = 4; string attach = 5; } message PayInfo{ google.protobuf.Value payInfo = 1; int64 orderId = 2; } message PayOrderInfo{ string userID = 1; int64 orderID = 2; // 订单的唯一ID int64 money = 3; // 支付金额 ,单位分 string type = 4; // 类型 string TransactionID = 5; string openId = 6; string description = 7; string status = 9;// 状态 int64 payTime = 10;// 支付时间 int64 createTime = 11;// 创建时间 } message PayOrderList{ repeated PayOrderInfo list = 1; int64 nextId = 2; } message FindPayOrderListRequest{ int64 nextId = 1; int64 offset = 2; string status = 3; } message PayCallbackReply{ bytes result = 1; }