| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290 |
- syntax = "proto3";
- package api.user;
- import "google/api/annotations.proto";
- //import "google/protobuf/struct.proto";
- import "google/protobuf/empty.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.PersonParam) 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.OnlinePersonListReply){
- 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 (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:"*"
- };
- };
- }
- message ChatCardInfo{
- string id = 1; // id
- string nickname = 2;// 昵称
- string avatarUrl =3;// 头像链接
- int64 sex = 4;// 性别
- int64 age = 6; // 年龄
- string constellation = 7; // 星座
- repeated common.TagList tagList = 9; // 标签列表
- string introduceVoice = 10; // 介绍语音
- string province = 11;// 省
- string city = 12;// 市
- string area = 13;// 区
- bool isFinishInformation = 14;//是否完善资料
- }
- 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
- }
- message KeyRequest{
- string key = 1;
- }
|