syntax = "proto3"; package api.partner; import "google/api/annotations.proto"; //import "google/protobuf/struct.proto"; import "google/protobuf/empty.proto"; import "api/common/common.proto"; import "api/statistics/statistics.proto"; import "api/chat/chat.proto"; option go_package = "git.ikuban.com/server/pw-protobuf/api/partner;partner"; option java_multiple_files = true; option java_package = "api.partner"; service Partner { // 1、获取接待员的个人信息 rpc GetPartnerInfo (google.protobuf.Empty) returns (PartnerInfo){ option (google.api.http) = { post: "/api/partner/info", body:"*" }; }; // 2、接待员发送验证码 rpc SendPhoneCode (common.SendPhoneCodeRequest) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/partner/code/send", body:"*" }; }; // 3、接待员验证验证码 rpc CheckPhoneCode (common.CheckPhoneCodeRequest) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/partner/code/check", body:"*" }; }; // 4、更新接待员的信息 rpc UpdatePartnerInformation (common.UpdateInformationRequest) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/partner/update/information", body:"*" }; }; // 5、创建用户与接待员的关联 rpc CreateUserPartnerRoom (common.CreateChatRoomParam) returns (chat.RoomReply){ option (google.api.http) = { post: "/api/partner/create/room", body:"*" }; }; // 6、获取接待员的金额信息 rpc GetPartnerBalance (google.protobuf.Empty) returns (PartnerBalance){ option (google.api.http) = { post: "/api/partner/balance", body:"*" }; }; // 7、接待员获取ta的主页信息 rpc PartnerGetHomeInfo (common.PersonParam) returns (common.HomeInfo){ option (google.api.http) = { post: "/api/partner/home", body:"*" }; }; // 8、接待员获取ta的主页访客、关注数 rpc PartnerGetPersonLikedAndLooked (common.PersonParam) returns (common.LookedAndLikedNum){ option (google.api.http) = { post: "/api/partner/num", body:"*" }; }; // 9、查看看过我的列表 rpc FindLookList (common.ListPageRequest) returns (statistics.LookAndLikeListReply){ option (google.api.http) = { post: "/api/partner/list/look", body:"*" }; }; // 10、微信SDK初始化 rpc WxConf (common.WxConfReq) returns (common.WxConfResponse){ option (google.api.http) = { post: "/api/wx/jssdk/config", body:"*" }; }; // 11、获取标签列表 rpc FindTagListBySex (common.SexReq) returns (common.TagListReply){ option (google.api.http) = { post: "/api/partner/list/tag", body:"*" }; }; // 12、获取在线列表 rpc FindOnlineList (common.ListPage2Request) returns (common.RecommendPersonListReply){ option (google.api.http) = { post: "/api/partner/list/online", body:"*" }; }; // 13、七天内列表(当前会话) rpc FindWithinSevenDayRoomList (common.ListPageRequest) returns (chat.PartnerFindRoomListReply){ option (google.api.http) = { post: "/api/partner/list/chat/within", body:"*" }; }; // 14、七天外列表(更早的聊天记录) rpc FindOverSevenDayRoomList (common.ListPageRequest) returns (chat.PartnerFindRoomListReply){ option (google.api.http) = { post: "/api/partner/list/chat/over", body:"*" }; }; // 15、接待者查询聊天记录 rpc FindChatRecordList (common.FindChatRecordListRequest) returns (common.ChatRecordListReply){ option (google.api.http) = { post: "/api/partner/chat/record", body:"*" }; }; // 16、接待者查询房间信息 rpc FindChatRoomMsg (common.FindChatRoomMsgRequest) returns (common.ChatRoomMsg){ option (google.api.http) = { post: "/api/partner/chat/room/msg", body:"*" }; }; // 17、接待员查询是否关注某人 rpc GetPartnerIsLike (common.PersonParam) returns (common.IsLike){ option (google.api.http) = { post: "/api/partner/islike", body:"*" }; }; // 18、通过类型获取表情包列表 rpc FindMemeByType (common.MemeRequest) returns (common.MemeList){ option (google.api.http) = { post: "/api/partner/find/meme/type", body:"*" }; }; // 19、获取对方性别的聊天话题 rpc FindChatTopic (common.FindChatTopicRequest) returns (common.ChatTopicList){ option (google.api.http) = { post: "/api/partner/find/topic", body:"*" }; }; // 20、随机表情包 rpc RandomMeme (common.RandomNum) returns (common.CommonTextList){ option (google.api.http) = { post: "/api/partner/find/meme/random", body:"*" }; }; // 21、随机打招呼 rpc RandomSwiftMessage (common.RandomNumAndSex) returns (common.CommonTextList){ option (google.api.http) = { post: "/api/partner/find/topic/random", body:"*" }; }; // 22、表情包分类名 rpc FindMemeTitle (google.protobuf.Empty) returns (common.MemeTitleList){ option (google.api.http) = { post: "/api/partner/find/meme/title", body:"*" }; }; // 23、接待员获取聊天对象的资料卡片 rpc PartnerGetChatCard(common.PersonParam) returns (common.PartnerChatCardInfo){ option (google.api.http) = { post: "/api/partner/chat/card", body:"*" }; }; // 24、聊天话题分类名 rpc FindChatTopicTitle (google.protobuf.Empty) returns (common.MemeTitleList){ option (google.api.http) = { post: "/api/partner/find/chat/title", body:"*" }; }; // 25、接待员关注某人 rpc PartnerLike(common.PersonParam) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/partner/like", body:"*" }; }; // 26、接待员取关某人 rpc PartnerUnLike(common.PersonParam) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/partner/unlike", body:"*" }; }; // 27、举报某人 rpc Report (common.ReportChatRequest) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/partner/report", body:"*" }; }; // 28、超过七天的头像列表 rpc FindOverSevenDayAvatar (google.protobuf.Empty) returns (common.FindOverSevenDayAvatarReply){ option (google.api.http) = { post: "/api/partner/over/avatar/list", body:"*" }; }; // 29、更新上次访问的小纸条 rpc UpdateLastScripID (common.UpdateLastScripIDRequest) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/partner/scrip/last/update", body:"*" }; }; // 30、创建纸条 rpc CreateScrip (CreateScripRequest) returns (common.ScripID){ option (google.api.http) = { post: "/api/partner/scrip/create", body:"*" }; }; // 31、删除纸条 rpc DeleteScrip (common.ScripIdRequest) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/partner/scrip/delete", body:"*" }; }; // 32、查询自己的小纸条 rpc FindMyScrip (common.ListPageRequest) returns (common.ScripReply){ option (google.api.http) = { post: "/api/partner/scrip/find/self", body:"*" }; }; // 33、查询别人的小纸条 rpc FindOtherScrip (common.FindScripRequest) returns (common.ScripReply){ option (google.api.http) = { post: "/api/partner/scrip/find/other", body:"*" }; }; // 34、查询随机纸条列表 rpc FindRecommendScrip (common.ListPageRequest) returns (common.ScripReply){ option (google.api.http) = { post: "/api/partner/scrip/find/recommend", body:"*" }; }; // 35、用户查看纸条 rpc PersonLookScrip (common.ScripIdRequest) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/partner/scrip/look", body:"*" }; }; // 36、用户点击回看 rpc PersonClickLookBack (google.protobuf.Empty) returns (common.ScripInfo){ option (google.api.http) = { post: "/api/partner/scrip/look/back", body:"*" }; }; // 37、用户回复小纸条 rpc PersonReplyScrip (ReplyScripRequest) returns (common.ChatRecordInfo){ option (google.api.http) = { post: "/api/partner/scrip/reply", body:"*" }; }; // 38、用户删除房间 rpc PartnerDeleteChat (common.RoomIDRequest) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/partner/chat/delete", body:"*" }; }; // // 拉黑某人 // rpc PartnerSetBlackChat (common.RoomIDRequest) returns (google.protobuf.Empty){ // option (google.api.http) = { // post: "/api/partner/set/black", // body:"*" // }; // }; // ---接待员专用--- // 接待员收藏某条记录 rpc PartnerCollect (PartnerCollectIDsRequest) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/partner/collect", body:"*" }; }; // 接待员取消收藏某条记录 rpc PartnerDeleteCollect (PartnerCollectRequest) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/partner/collect/delete", body:"*" }; }; // 查询接待员在本房间的收藏列表 rpc FindChatCollectList (common.FindChatRecordListRequest) returns (common.ChatRecordListReply){ option (google.api.http) = { post: "/api/partner/collect/list", body:"*" }; }; // 获取接待员的部分信息 rpc GetPartnerMessage (google.protobuf.Empty) returns (PartnerMessage){ option (google.api.http) = { post: "/api/partner/message", body:"*" }; }; // 获取接待员访问数详情 rpc GetPartnerLookNum (google.protobuf.Empty) returns (statistics.LookMessageReply){ option (google.api.http) = { post: "/api/partner/num/look", body:"*" }; }; // 未读列表(排队中) rpc FindUnReplyRoomList (common.ListPageRequest) returns (chat.PartnerFindRoomListReply){ option (google.api.http) = { post: "/api/partner/list/chat/unreply", body:"*" }; }; // 获取等级对应收益表 rpc GetLevelBalanceTable (google.protobuf.Empty) returns (LevelTable){ option (google.api.http) = { post: "/api/partner/level/table", body:"*" }; }; // 接待员领取开通奖励 rpc PartnerGetAward (PartnerGetAwardRequest) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/partner/chat/award", body:"*" }; }; // 接待员更新工作状态 rpc PartnerUpdateWorkingStatus (PartnerUpdateWorkingStatusRequest) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/partner/working/status/update", body:"*" }; }; // 查询未处理的数据 rpc FindNotReplyNum (google.protobuf.Empty) returns (chat.FindNotReplyNumReply){ option (google.api.http) = { post: "/api/partner/chat/unreply/num", body:"*" }; }; // 接待员申请提现 rpc PartnerApplyWithdraw (PartnerApplyWithdrawRequest) returns (google.protobuf.Empty){ option (google.api.http) = { post: "/api/partner/withdraw", body:"*" }; }; // 接待员提现模板列表 rpc PartnerWithdrawTemplateList (google.protobuf.Empty) returns (PartnerWithdrawTemplateListReply){ option (google.api.http) = { post: "/api/partner/withdraw/template/list", body:"*" }; }; // 接待员提现记录列表 rpc PartnerWithdrawRecordList (common.ListPageRequest) returns (PartnerWithdrawRecordListReply){ option (google.api.http) = { post: "/api/partner/withdraw/record/list", body:"*" }; }; // ---rpc--- // 1、获取用户详情 rpc GetPartnerDBMsg (common.PersonIDParam) returns (common.PersonMsg); // 2、通过接待员IDs查看接待员信息列表 rpc FindPartnerDBList (common.PersonIDList) returns (common.PersonDBReply); // 3、对内更新 rpc UpdateLastScripIDDB (common.UpdateLastScripIDDBRequest) returns (google.protobuf.Empty){}; // 4、查询推荐用户的数据 rpc FindRecommendPartnerDBList (common.FindRecommendRequest) returns (common.PersonDBReply){}; // 5、更新上次登录时间 rpc UpdatePartnerLastLoginTime (common.PersonIDParam) returns (google.protobuf.Empty){}; // 获取接待员金额 rpc GetPartnerDBBalance (common.PartnerIDParam) returns (PartnerDBBalance){} // 增加接待员金额 rpc AddPartnerBalance(AddPartnerBalanceRequest)returns (google.protobuf.Empty){}; // 获取接待员的确认通过页面信息 rpc GetPartnerCircleInfo (common.PartnerIDParam) returns (common.AddFriendMessageInfo); } message PartnerCollectIDsRequest{ repeated int64 chatRecordIds = 1;// 记录ID int64 roomId = 2;// 房间ID } message PartnerCollectRequest{ int64 chatRecordId = 1;// 记录ID } message CreateScripRequest { string text = 1;// 纸条内容 string pictureUrl = 2; // 纸条背景图 } message ReplyScripRequest { int64 scripId = 4;// 小纸条ID common.Message message = 5;// 回复内容 只需要提供 回复小纸条的内容 或 回复小纸条的素材链接 string msgType = 6; } message PartnerWithdrawRecordListReply{ int64 nextId = 1; repeated WithdrawInfo list = 2; } message WithdrawInfo{ int64 id = 1;// 记录ID int64 money = 2;// 提现多少钱 int64 credit = 3;// 提现需要多少积分 string status = 4;// 状态 string result = 5;// 结果 int64 createTime = 6;// 创建时间 int64 successTime = 7;// 成功时间 } message PartnerWithdrawTemplateListReply{ repeated PartnerWithdrawTemplateInfo list = 1; } message PartnerWithdrawTemplateInfo { int64 id = 1; int64 money = 2;// 提现多少钱 int64 credit = 3;// 提现需要多少积分 string title = 4;// 提现的标题 } message PartnerUpdateWorkingStatusRequest{ string workingStatus = 1;// 工作状态 } message PartnerGetAwardRequest{ string awardType = 1;// 奖励类型 string personID = 2; // 查询目标的ID string personType = 3; // 类型 } message LevelTable{ repeated LevelInfo list = 1; } message LevelInfo{ int64 level = 1;// 等级 int64 chatBenefit = 2;// 聊天收益 int64 callBenefit = 3;// 语音通话收益 string condition = 4;// 达成条件 } message AddPartnerBalanceRequest{ string partnerId = 1; int64 balance = 2; } message PartnerInfo{ string id = 1; // id string nickname = 2;// 昵称 string avatarUrl =3;// 头像链接 int64 age = 4;// 年龄 int64 sex = 5;// 性别 string constellation = 6; // 星座 int64 level = 7;// 等级 repeated int64 tagList = 8; // 标签 string signature = 9; // 签名 string introduceVoice = 10; // 介绍语音 string province = 11;// 省 string city = 12;// 市 string area = 13;// 区 int64 partnerId = 14;// 接待员ID bool isBlack = 15;// 是否被封号 string workingStatus = 16;// 工作状态 } message PartnerMessage{ string id = 1; // id int64 lookNum = 2; // 看过我的数量 int64 lookUnreadNum = 3; // 未读的看过我的数量 int64 todayReceptionNum = 4;// 今日接待人数 string reversionRate = 5;// 五分钟的回复率 } message PartnerBalance{ string id = 1; // id int64 balance = 2;// 可提现余额 int64 todayProfit = 3;// 今日收益 int64 level = 4;// 等级 int64 chatBenefit = 5;// 聊天收益 int64 callBenefit = 6;// 语音通话收益 string upLevelCondition = 7;// 升级条件 int64 upLevelBenefit = 8;// 升级需要的收益 } message PartnerDBBalance{ string id = 1; // id int64 level = 2;// 等级 int64 chatBenefit = 3;// 聊天收益 int64 callBenefit = 4;// 语音通话收益 } message PartnerApplyWithdrawRequest{ int64 templateId = 1;// 提现模板id }