From d4f8468d5566be0771c8972ec2b2320f336ac704 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Thu, 30 Mar 2023 15:00:11 +0800 Subject: [PATCH] update --- gim/business.ext.proto | 17 ++++++++++++++++- gim/business.int.proto | 6 ++++++ gim/connect.ext.proto | 6 +++--- gim/logic.ext.proto | 3 ++- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/gim/business.ext.proto b/gim/business.ext.proto index 4454e03..6854590 100644 --- a/gim/business.ext.proto +++ b/gim/business.ext.proto @@ -17,6 +17,19 @@ service BusinessExt { rpc CloudUploadFile (CloudUploadFileReq) returns (CloudUploadFileResp); // 获取表情 rpc EmoticonList (Empty) returns (EmoticonListResp); + // 判断是否为好友关系 + rpc IsFriends (IsFriendsReq) returns (IsFriendsResp); +} + + +message IsFriendsReq { + string user_phone = 1; + string friend_phone = 2; +} + +message IsFriendsResp { + int64 is_friend = 1; + User user = 2; // 用户信息 } message Emoticon { @@ -61,11 +74,13 @@ message User { string extra = 5; // 附加字段 int64 create_time = 6; // 创建时间 int64 update_time = 7; // 更新时间 - int64 master_id = 8; // 更新时间 + int64 master_id = 8; // 站长id + int64 is_auto_added_friends = 9; // 是否自动被添加好友 } message GetUserReq { int64 user_id = 1; // 用户id + string phone = 2; // 用户手机号 } message GetUserResp { User user = 1; // 用户信息 diff --git a/gim/business.int.proto b/gim/business.int.proto index 95ac3e5..f8dc7c4 100644 --- a/gim/business.int.proto +++ b/gim/business.int.proto @@ -6,6 +6,8 @@ import "common.ext.proto"; import "business.ext.proto"; service BusinessInt { + // 站长权限校验 + rpc MasterAuth (MasterAuthReq) returns (Empty); // 权限校验 rpc Auth (AuthReq) returns (Empty); // 批量获取用户信息 @@ -14,6 +16,10 @@ service BusinessInt { rpc GetUsers (GetUsersReq) returns (GetUsersResp); } +message MasterAuthReq { + string master_id = 1; +} + message AuthReq { int64 user_id = 1; int64 device_id = 2; diff --git a/gim/connect.ext.proto b/gim/connect.ext.proto index 50b1efc..d923e50 100644 --- a/gim/connect.ext.proto +++ b/gim/connect.ext.proto @@ -142,9 +142,9 @@ message RED_PACKAGE { float red_packet_amount = 6; // 红包金额 int32 red_packet_nums = 5; // 红包数量 float red_packet_balance_amount = 7; // 红包余额 - repeated int64 received_user_ids = 8; // 已领取用户id - repeated float received_user_amount = 9; // 已领取用户金额 - repeated string received_user_nickname = 10; // 已领取用户昵称 + int64 received_user_id = 8; // 领取用户id + float received_user_amount = 9; // 领取用户金额 + string received_user_nickname = 10; // 领取用户昵称 RedPacketStatusType red_packet_status_type = 11; // 领取状态 int64 red_packet_id = 12; // 红包id } diff --git a/gim/logic.ext.proto b/gim/logic.ext.proto index 4ac501e..35eea34 100644 --- a/gim/logic.ext.proto +++ b/gim/logic.ext.proto @@ -95,7 +95,8 @@ message SendRedPacketReq { MessageType message_type = 3; // 消息类型 bytes message_content = 4; // 消息内容 int64 send_time = 5; // 消息发送时间戳,精确到毫秒 - string message_content_back = 6; + repeated int64 to_user_ids = 6; // 红包给到哪些用户(专属红包) + string message_content_back = 7; } message SendRedPacketResp { int64 seq = 1; // 消息序列号