1458 lines
44 KiB
Protocol Buffer
1458 lines
44 KiB
Protocol Buffer
syntax = "proto3";
|
||
package openim.admin;
|
||
|
||
import "common/common.proto";
|
||
import "sdkws/sdkws.proto";
|
||
import "wrapperspb/wrapperspb.proto";
|
||
|
||
option go_package = "git.imall.cloud/openim/chat/pkg/protocol/admin";
|
||
|
||
// login
|
||
message LoginReq {
|
||
string account = 1;
|
||
string password = 2;
|
||
string version = 3;
|
||
string googleAuthCode = 4; // Google Authenticator 验证码(如果设置了 googleAuthKey 则必填)
|
||
}
|
||
|
||
message LoginResp {
|
||
string adminAccount = 1;
|
||
string adminToken = 2;
|
||
string nickname = 3;
|
||
string faceURL = 4;
|
||
int32 level = 5;
|
||
string adminUserID = 6;
|
||
}
|
||
|
||
message AddAdminAccountReq {
|
||
string account = 1;
|
||
string password = 2;
|
||
string faceURL = 3;
|
||
string nickname = 4;
|
||
}
|
||
|
||
message AddAdminAccountResp {}
|
||
|
||
message AdminUpdateInfoReq {
|
||
openim.protobuf.StringValue account = 1;
|
||
openim.protobuf.StringValue password = 2;
|
||
openim.protobuf.StringValue faceURL = 3;
|
||
openim.protobuf.StringValue nickname = 4;
|
||
openim.protobuf.Int32Value level = 6;
|
||
openim.protobuf.StringValue googleAuthKey = 7;
|
||
openim.protobuf.StringValue operationPassword = 9;
|
||
}
|
||
|
||
message AdminUpdateInfoResp {
|
||
string userID = 1;
|
||
string nickname = 2;
|
||
string faceURL = 3;
|
||
}
|
||
|
||
message ChangePasswordReq {
|
||
string password = 1;
|
||
string currentOperationPassword = 2; // 当前操作密码(修改操作密码时需要)
|
||
string newOperationPassword = 3; // 新操作密码(可选,如果提供则修改操作密码)
|
||
}
|
||
|
||
message ChangePasswordResp {}
|
||
|
||
message GetAdminInfoReq {}
|
||
|
||
message ChangeAdminPasswordReq {
|
||
string userID = 1;
|
||
string currentPassword = 2;
|
||
string newPassword = 3;
|
||
}
|
||
|
||
message ChangeAdminPasswordResp {}
|
||
|
||
message ChangeOperationPasswordReq {
|
||
string currentPassword = 1; // 当前操作密码(如果已设置)
|
||
string newPassword = 2; // 新操作密码
|
||
}
|
||
|
||
message ChangeOperationPasswordResp {}
|
||
|
||
message DelAdminAccountReq {
|
||
repeated string userIDs = 1;
|
||
}
|
||
|
||
message DelAdminAccountResp {}
|
||
|
||
message SearchAdminAccountReq {
|
||
string keyword = 1; // 搜索关键词(可选),支持账号、昵称、用户ID的模糊搜索
|
||
openim.sdkws.RequestPagination pagination = 2;
|
||
}
|
||
|
||
message SearchAdminAccountResp {
|
||
uint32 total = 1;
|
||
repeated GetAdminInfoResp adminAccounts = 2;
|
||
}
|
||
|
||
message GetAdminInfoResp {
|
||
string account = 2;
|
||
string password = 3;
|
||
string faceURL = 4;
|
||
string nickname = 5;
|
||
string userID = 6;
|
||
int32 level = 7;
|
||
int64 createTime = 8;
|
||
string googleAuthKey = 9;
|
||
string operationPassword = 11;
|
||
}
|
||
|
||
// 设置谷歌身份验证密钥请求
|
||
message SetGoogleAuthKeyReq {
|
||
int32 operationType = 1; // 操作类型:1-新设置(如果为空则设置,如果已存在则返回错误),2-强制覆盖旧的(即使存在也生成新的),3-清空(删除现有的密钥)
|
||
string userID = 2; // 目标管理员ID,可选;为空时默认当前登录管理员,非空时仅超级管理员可操作
|
||
}
|
||
|
||
// 设置谷歌身份验证密钥响应
|
||
message SetGoogleAuthKeyResp {
|
||
string googleAuthKey = 1; // 生成的谷歌身份验证密钥(Base32编码),操作类型为3(清空)时为空字符串
|
||
string qrCodeURL = 2; // 二维码URL(otpauth格式),用于扫码绑定到Google Authenticator,操作类型为3(清空)时为空字符串
|
||
int32 operationType = 3; // 实际执行的操作类型:1-新设置,2-强制覆盖,3-清空
|
||
}
|
||
|
||
// ################### Default Friend ###################
|
||
|
||
message AddDefaultFriendReq {
|
||
repeated string userIDs = 1;
|
||
}
|
||
|
||
message AddDefaultFriendResp {}
|
||
|
||
message DelDefaultFriendReq {
|
||
repeated string userIDs = 1;
|
||
}
|
||
|
||
message DelDefaultFriendResp {}
|
||
|
||
message FindDefaultFriendReq {}
|
||
|
||
message FindDefaultFriendResp {
|
||
repeated string userIDs = 1;
|
||
}
|
||
|
||
message SearchDefaultFriendReq {
|
||
string keyword = 1;
|
||
openim.sdkws.RequestPagination pagination = 2;
|
||
}
|
||
|
||
message DefaultFriendAttribute {
|
||
string userID = 1;
|
||
int64 createTime = 2;
|
||
openim.chat.common.UserPublicInfo user = 3;
|
||
}
|
||
|
||
message SearchDefaultFriendResp {
|
||
uint32 total = 1;
|
||
repeated DefaultFriendAttribute users = 2;
|
||
}
|
||
|
||
// ################### DefaultGroup ###################
|
||
|
||
message AddDefaultGroupReq {
|
||
repeated string groupIDs = 1;
|
||
}
|
||
|
||
message AddDefaultGroupResp {}
|
||
|
||
message DelDefaultGroupReq {
|
||
repeated string groupIDs = 1;
|
||
}
|
||
|
||
message DelDefaultGroupResp {}
|
||
|
||
message FindDefaultGroupReq {}
|
||
|
||
message FindDefaultGroupResp {
|
||
repeated string groupIDs = 1;
|
||
}
|
||
|
||
message SearchDefaultGroupReq {
|
||
string keyword = 1;
|
||
openim.sdkws.RequestPagination pagination = 2;
|
||
}
|
||
|
||
message GroupAttribute {
|
||
string groupID = 1;
|
||
int64 createTime = 2;
|
||
openim.sdkws.GroupInfo group = 3;
|
||
}
|
||
|
||
message SearchDefaultGroupResp {
|
||
uint32 total = 1;
|
||
repeated string groupIDs = 2;
|
||
}
|
||
|
||
// ################### InvitationCode ###################
|
||
|
||
message AddInvitationCodeReq {
|
||
repeated string codes = 1;
|
||
}
|
||
|
||
message AddInvitationCodeResp {}
|
||
|
||
message GenInvitationCodeReq {
|
||
int32 len = 1;
|
||
int32 num = 2;
|
||
string chars = 3;
|
||
}
|
||
|
||
message GenInvitationCodeResp {}
|
||
|
||
message FindInvitationCodeReq {
|
||
repeated string codes = 1;
|
||
}
|
||
|
||
message FindInvitationCodeResp {
|
||
repeated InvitationRegister codes = 1;
|
||
}
|
||
|
||
message UseInvitationCodeReq {
|
||
string code = 1;
|
||
string userID = 2;
|
||
}
|
||
|
||
message UseInvitationCodeResp {}
|
||
|
||
message DelInvitationCodeReq {
|
||
repeated string codes = 1;
|
||
}
|
||
|
||
message DelInvitationCodeResp {}
|
||
|
||
message InvitationRegister {
|
||
string invitationCode = 1;
|
||
int64 createTime = 2;
|
||
string usedUserID = 3;
|
||
openim.chat.common.UserPublicInfo usedUser = 4;
|
||
}
|
||
|
||
message SearchInvitationCodeReq {
|
||
int32 status = 1;
|
||
repeated string userIDs = 2;
|
||
repeated string codes = 3;
|
||
string keyword = 4;
|
||
openim.sdkws.RequestPagination pagination = 5;
|
||
}
|
||
|
||
message SearchInvitationCodeResp {
|
||
uint32 total = 1;
|
||
repeated InvitationRegister list = 2;
|
||
}
|
||
|
||
// ################### User Login IP Limit ###################
|
||
|
||
message SearchUserIPLimitLoginReq {
|
||
string keyword = 1;
|
||
openim.sdkws.RequestPagination pagination = 2;
|
||
}
|
||
|
||
message LimitUserLoginIP {
|
||
string userID = 1;
|
||
string ip = 2;
|
||
int64 createTime = 3;
|
||
openim.chat.common.UserPublicInfo user = 4;
|
||
}
|
||
|
||
message SearchUserIPLimitLoginResp {
|
||
uint32 total = 1;
|
||
repeated LimitUserLoginIP limits = 2;
|
||
}
|
||
|
||
message UserIPLimitLogin {
|
||
string userID = 1;
|
||
string ip = 2;
|
||
}
|
||
|
||
message AddUserIPLimitLoginReq {
|
||
repeated UserIPLimitLogin limits = 1;
|
||
}
|
||
|
||
message AddUserIPLimitLoginResp {}
|
||
|
||
message DelUserIPLimitLoginReq {
|
||
repeated UserIPLimitLogin limits = 1;
|
||
}
|
||
|
||
message DelUserIPLimitLoginResp {}
|
||
|
||
// ################### User IP Limit ###################
|
||
|
||
message IPForbidden {
|
||
string ip = 1;
|
||
bool limitRegister = 2;
|
||
bool limitLogin = 3;
|
||
int64 createTime = 4;
|
||
}
|
||
|
||
message IPForbiddenAdd {
|
||
string ip = 1;
|
||
bool limitRegister = 2;
|
||
bool limitLogin = 3;
|
||
}
|
||
|
||
message SearchIPForbiddenReq {
|
||
string keyword = 1;
|
||
int32 status = 2;
|
||
openim.sdkws.RequestPagination pagination = 3;
|
||
}
|
||
|
||
message SearchIPForbiddenResp {
|
||
uint32 total = 1;
|
||
repeated IPForbidden forbiddens = 2;
|
||
}
|
||
|
||
message AddIPForbiddenReq {
|
||
repeated IPForbiddenAdd forbiddens = 1;
|
||
}
|
||
message AddIPForbiddenResp {}
|
||
|
||
message DelIPForbiddenReq {
|
||
repeated string ips = 1;
|
||
}
|
||
message DelIPForbiddenResp {}
|
||
|
||
// ################### User Limit ###################
|
||
message CheckRegisterForbiddenReq {
|
||
string ip = 1;
|
||
}
|
||
|
||
message CheckRegisterForbiddenResp {}
|
||
|
||
message CheckLoginForbiddenReq {
|
||
string ip = 1;
|
||
string userID = 2;
|
||
}
|
||
|
||
message CheckLoginForbiddenResp {}
|
||
|
||
// ################### login out ###################
|
||
message CancellationUserReq {
|
||
string userID = 1;
|
||
string reason = 2;
|
||
}
|
||
|
||
message CancellationUserResp {}
|
||
|
||
// ################### Block User, Unblock User ###################
|
||
message BlockUserReq {
|
||
string userID = 1;
|
||
string reason = 2;
|
||
}
|
||
|
||
message BlockUserResp {}
|
||
|
||
message UnblockUserReq {
|
||
repeated string userIDs = 1;
|
||
}
|
||
|
||
message UnblockUserResp {}
|
||
|
||
message SearchBlockUserReq {
|
||
string keyword = 1;
|
||
openim.sdkws.RequestPagination pagination = 2;
|
||
}
|
||
|
||
message BlockUserInfo {
|
||
string userID = 1;
|
||
string account = 2;
|
||
string phoneNumber = 3;
|
||
string areaCode = 4;
|
||
string email = 5;
|
||
string nickname = 6;
|
||
string faceURL = 7;
|
||
int32 gender = 8;
|
||
string reason = 9;
|
||
string opUserID = 10;
|
||
int64 createTime = 11;
|
||
}
|
||
|
||
message SearchBlockUserResp {
|
||
uint32 total = 1;
|
||
repeated BlockUserInfo users = 2;
|
||
}
|
||
|
||
message FindUserBlockInfoReq {
|
||
repeated string userIDs = 1;
|
||
}
|
||
|
||
message BlockInfo {
|
||
string userID = 1;
|
||
string reason = 2;
|
||
string opUserID = 3;
|
||
int64 createTime = 4;
|
||
}
|
||
|
||
message FindUserBlockInfoResp {
|
||
repeated BlockInfo blocks = 2;
|
||
}
|
||
|
||
// ################### TOKEN ###################
|
||
|
||
message CreateTokenReq {
|
||
string userID = 1;
|
||
int32 userType = 32;
|
||
}
|
||
|
||
message CreateTokenResp {
|
||
string token = 1;
|
||
}
|
||
|
||
message ParseTokenReq {
|
||
string token = 1;
|
||
}
|
||
|
||
message ParseTokenResp {
|
||
string userID = 1;
|
||
int32 userType = 2;
|
||
int64 expireTimeSeconds = 3;
|
||
}
|
||
|
||
message InvalidateTokenReq {
|
||
string userID = 1;
|
||
}
|
||
|
||
message InvalidateTokenResp {}
|
||
|
||
// ################### mini program ###################
|
||
|
||
message AddAppletReq {
|
||
string id = 1;
|
||
string name = 2;
|
||
string appID = 3;
|
||
string icon = 4;
|
||
string url = 5;
|
||
string md5 = 6;
|
||
int64 size = 7;
|
||
string version = 8;
|
||
uint32 priority = 9;
|
||
uint32 status = 10;
|
||
int64 createTime = 11;
|
||
}
|
||
|
||
message AddAppletResp {}
|
||
|
||
message DelAppletReq {
|
||
repeated string appletIds = 1;
|
||
}
|
||
|
||
message DelAppletResp {}
|
||
|
||
message UpdateAppletReq {
|
||
string id = 1;
|
||
openim.protobuf.StringValue name = 2;
|
||
openim.protobuf.StringValue appID = 3;
|
||
openim.protobuf.StringValue icon = 4;
|
||
openim.protobuf.StringValue url = 5;
|
||
openim.protobuf.StringValue md5 = 6;
|
||
openim.protobuf.Int64Value size = 7;
|
||
openim.protobuf.StringValue version = 8;
|
||
openim.protobuf.UInt32Value priority = 9;
|
||
openim.protobuf.UInt32Value status = 10;
|
||
openim.protobuf.Int64Value createTime = 11;
|
||
}
|
||
|
||
message UpdateAppletResp {}
|
||
|
||
message FindAppletReq {}
|
||
|
||
message FindAppletResp {
|
||
repeated openim.chat.common.AppletInfo applets = 1;
|
||
}
|
||
|
||
message SearchAppletReq {
|
||
string keyword = 1;
|
||
openim.sdkws.RequestPagination pagination = 2;
|
||
}
|
||
|
||
message SearchAppletResp {
|
||
uint32 total = 1;
|
||
repeated openim.chat.common.AppletInfo applets = 2;
|
||
}
|
||
|
||
message SetClientConfigReq {
|
||
map<string, string> config = 1;
|
||
}
|
||
|
||
message SetClientConfigResp {}
|
||
|
||
message DelClientConfigReq {
|
||
repeated string keys = 1;
|
||
}
|
||
|
||
message DelClientConfigResp {}
|
||
|
||
message GetClientConfigReq {}
|
||
|
||
message GetClientConfigResp {
|
||
map<string, string> config = 1;
|
||
}
|
||
|
||
message GetUserTokenReq {
|
||
string userID = 1;
|
||
}
|
||
|
||
message GetUserTokenResp {
|
||
map<string, int32> tokensMap = 1;
|
||
}
|
||
|
||
|
||
message ApplicationVersion {
|
||
string id = 1;
|
||
string platform = 2;
|
||
string version = 3;
|
||
string url = 4;
|
||
string text = 5;
|
||
bool force = 6;
|
||
bool latest = 7;
|
||
bool hot = 8;
|
||
int64 createTime = 9;
|
||
}
|
||
|
||
message LatestApplicationVersionReq {
|
||
string platform = 2;
|
||
string version = 3;
|
||
}
|
||
|
||
message LatestApplicationVersionResp {
|
||
ApplicationVersion version = 1;
|
||
}
|
||
|
||
message AddApplicationVersionReq {
|
||
string platform = 1;
|
||
string version = 2;
|
||
string url = 3;
|
||
string text = 4;
|
||
bool force = 5;
|
||
bool latest = 6;
|
||
bool hot = 7;
|
||
}
|
||
|
||
message AddApplicationVersionResp {
|
||
|
||
}
|
||
|
||
message UpdateApplicationVersionReq {
|
||
string id = 1;
|
||
openim.protobuf.StringValue platform = 2;
|
||
openim.protobuf.StringValue version = 3;
|
||
openim.protobuf.StringValue url = 4;
|
||
openim.protobuf.StringValue text = 5;
|
||
openim.protobuf.BoolValue force = 6;
|
||
openim.protobuf.BoolValue latest = 7;
|
||
openim.protobuf.BoolValue hot = 8;
|
||
}
|
||
|
||
message UpdateApplicationVersionResp {
|
||
|
||
}
|
||
|
||
message DeleteApplicationVersionReq {
|
||
repeated string id = 1;
|
||
}
|
||
|
||
message DeleteApplicationVersionResp {
|
||
|
||
}
|
||
|
||
message PageApplicationVersionReq {
|
||
repeated string platform = 1;
|
||
openim.sdkws.RequestPagination pagination = 2;
|
||
}
|
||
|
||
message PageApplicationVersionResp {
|
||
int64 total = 1;
|
||
repeated ApplicationVersion versions = 2;
|
||
}
|
||
|
||
|
||
service admin {
|
||
// Login
|
||
rpc Login(LoginReq) returns (LoginResp);
|
||
rpc ChangePassword(ChangePasswordReq) returns (ChangePasswordResp);
|
||
rpc AdminUpdateInfo(AdminUpdateInfoReq) returns (AdminUpdateInfoResp);
|
||
// Get administrator information
|
||
rpc GetAdminInfo(GetAdminInfoReq) returns (GetAdminInfoResp);
|
||
rpc AddAdminAccount(AddAdminAccountReq) returns (AddAdminAccountResp);
|
||
rpc ChangeAdminPassword(ChangeAdminPasswordReq) returns (ChangeAdminPasswordResp);
|
||
rpc ChangeOperationPassword(ChangeOperationPasswordReq) returns (ChangeOperationPasswordResp);
|
||
rpc SetGoogleAuthKey(SetGoogleAuthKeyReq) returns (SetGoogleAuthKeyResp);
|
||
rpc DelAdminAccount(DelAdminAccountReq) returns (DelAdminAccountResp);
|
||
rpc SearchAdminAccount(SearchAdminAccountReq) returns (SearchAdminAccountResp);
|
||
|
||
// Add Remove Get default friend list on registration
|
||
rpc AddDefaultFriend(AddDefaultFriendReq) returns (AddDefaultFriendResp);
|
||
rpc DelDefaultFriend(DelDefaultFriendReq) returns (DelDefaultFriendResp);
|
||
rpc FindDefaultFriend(FindDefaultFriendReq) returns (FindDefaultFriendResp);
|
||
rpc SearchDefaultFriend(SearchDefaultFriendReq) returns (SearchDefaultFriendResp);
|
||
|
||
rpc AddDefaultGroup(AddDefaultGroupReq) returns (AddDefaultGroupResp);
|
||
rpc DelDefaultGroup(DelDefaultGroupReq) returns (DelDefaultGroupResp);
|
||
rpc FindDefaultGroup(FindDefaultGroupReq) returns (FindDefaultGroupResp);
|
||
rpc SearchDefaultGroup(SearchDefaultGroupReq) returns (SearchDefaultGroupResp);
|
||
|
||
// Invitation Code Generate Query Get
|
||
rpc AddInvitationCode(AddInvitationCodeReq) returns (AddInvitationCodeResp);
|
||
rpc GenInvitationCode(GenInvitationCodeReq) returns (GenInvitationCodeResp);
|
||
rpc FindInvitationCode(FindInvitationCodeReq) returns (FindInvitationCodeResp);
|
||
rpc UseInvitationCode(UseInvitationCodeReq) returns (UseInvitationCodeResp);
|
||
rpc DelInvitationCode(DelInvitationCodeReq) returns (DelInvitationCodeResp);
|
||
rpc SearchInvitationCode(SearchInvitationCodeReq) returns (SearchInvitationCodeResp);
|
||
|
||
// User login ip limit Query Add Remove
|
||
rpc SearchUserIPLimitLogin(SearchUserIPLimitLoginReq) returns (SearchUserIPLimitLoginResp);
|
||
rpc AddUserIPLimitLogin(AddUserIPLimitLoginReq) returns (AddUserIPLimitLoginResp);
|
||
rpc DelUserIPLimitLogin(DelUserIPLimitLoginReq) returns (DelUserIPLimitLoginResp);
|
||
|
||
// Prohibit users from registering at certain ip Query Add Remove
|
||
rpc SearchIPForbidden(SearchIPForbiddenReq) returns (SearchIPForbiddenResp);
|
||
rpc AddIPForbidden(AddIPForbiddenReq) returns (AddIPForbiddenResp);
|
||
rpc DelIPForbidden(DelIPForbiddenReq) returns (DelIPForbiddenResp);
|
||
|
||
// User Management Related Add Block/Unblock Pull
|
||
rpc CancellationUser(CancellationUserReq) returns (CancellationUserResp);
|
||
rpc BlockUser(BlockUserReq) returns (BlockUserResp);
|
||
rpc UnblockUser(UnblockUserReq) returns (UnblockUserResp);
|
||
rpc SearchBlockUser(SearchBlockUserReq) returns (SearchBlockUserResp);
|
||
rpc FindUserBlockInfo(FindUserBlockInfoReq) returns (FindUserBlockInfoResp);
|
||
|
||
rpc CheckRegisterForbidden(CheckRegisterForbiddenReq) returns (CheckRegisterForbiddenResp);
|
||
rpc CheckLoginForbidden(CheckLoginForbiddenReq) returns (CheckLoginForbiddenResp);
|
||
|
||
// create token
|
||
rpc CreateToken(CreateTokenReq) returns (CreateTokenResp);
|
||
// parse token
|
||
rpc ParseToken(ParseTokenReq) returns (ParseTokenResp);
|
||
|
||
// app
|
||
rpc AddApplet(AddAppletReq) returns (AddAppletResp);
|
||
rpc DelApplet(DelAppletReq) returns (DelAppletResp);
|
||
rpc UpdateApplet(UpdateAppletReq) returns (UpdateAppletResp);
|
||
rpc FindApplet(FindAppletReq) returns (FindAppletResp);
|
||
rpc SearchApplet(SearchAppletReq) returns (SearchAppletResp);
|
||
|
||
// Client Configuration
|
||
rpc GetClientConfig(GetClientConfigReq) returns (GetClientConfigResp);
|
||
rpc SetClientConfig(SetClientConfigReq) returns (SetClientConfigResp);
|
||
rpc DelClientConfig(DelClientConfigReq) returns (DelClientConfigResp);
|
||
|
||
rpc GetUserToken(GetUserTokenReq) returns (GetUserTokenResp);
|
||
|
||
// invalidate token
|
||
rpc InvalidateToken(InvalidateTokenReq) returns (InvalidateTokenResp);
|
||
|
||
rpc LatestApplicationVersion(LatestApplicationVersionReq) returns (LatestApplicationVersionResp);
|
||
rpc AddApplicationVersion(AddApplicationVersionReq) returns (AddApplicationVersionResp);
|
||
rpc UpdateApplicationVersion(UpdateApplicationVersionReq) returns (UpdateApplicationVersionResp);
|
||
rpc DeleteApplicationVersion(DeleteApplicationVersionReq) returns (DeleteApplicationVersionResp);
|
||
rpc PageApplicationVersion(PageApplicationVersionReq) returns (PageApplicationVersionResp);
|
||
|
||
// ==================== 敏感词管理 ====================
|
||
|
||
// 敏感词管理
|
||
rpc AddSensitiveWord(AddSensitiveWordReq) returns (AddSensitiveWordResp);
|
||
rpc UpdateSensitiveWord(UpdateSensitiveWordReq) returns (UpdateSensitiveWordResp);
|
||
rpc DeleteSensitiveWord(DeleteSensitiveWordReq) returns (DeleteSensitiveWordResp);
|
||
rpc GetSensitiveWord(GetSensitiveWordReq) returns (GetSensitiveWordResp);
|
||
rpc SearchSensitiveWords(SearchSensitiveWordsReq) returns (SearchSensitiveWordsResp);
|
||
rpc BatchAddSensitiveWords(BatchAddSensitiveWordsReq) returns (BatchAddSensitiveWordsResp);
|
||
rpc BatchUpdateSensitiveWords(BatchUpdateSensitiveWordsReq) returns (BatchUpdateSensitiveWordsResp);
|
||
rpc BatchDeleteSensitiveWords(BatchDeleteSensitiveWordsReq) returns (BatchDeleteSensitiveWordsResp);
|
||
|
||
// 敏感词分组管理
|
||
rpc AddSensitiveWordGroup(AddSensitiveWordGroupReq) returns (AddSensitiveWordGroupResp);
|
||
rpc UpdateSensitiveWordGroup(UpdateSensitiveWordGroupReq) returns (UpdateSensitiveWordGroupResp);
|
||
rpc DeleteSensitiveWordGroup(DeleteSensitiveWordGroupReq) returns (DeleteSensitiveWordGroupResp);
|
||
rpc GetSensitiveWordGroup(GetSensitiveWordGroupReq) returns (GetSensitiveWordGroupResp);
|
||
rpc GetAllSensitiveWordGroups(GetAllSensitiveWordGroupsReq) returns (GetAllSensitiveWordGroupsResp);
|
||
|
||
// 敏感词配置管理
|
||
rpc GetSensitiveWordConfig(GetSensitiveWordConfigReq) returns (GetSensitiveWordConfigResp);
|
||
rpc UpdateSensitiveWordConfig(UpdateSensitiveWordConfigReq) returns (UpdateSensitiveWordConfigResp);
|
||
|
||
// 敏感词日志管理
|
||
rpc GetSensitiveWordLogs(GetSensitiveWordLogsReq) returns (GetSensitiveWordLogsResp);
|
||
rpc DeleteSensitiveWordLogs(DeleteSensitiveWordLogsReq) returns (DeleteSensitiveWordLogsResp);
|
||
|
||
// 用户登录记录管理
|
||
rpc GetUserLoginRecords(GetUserLoginRecordsReq) returns (GetUserLoginRecordsResp);
|
||
|
||
// 敏感词统计
|
||
rpc GetSensitiveWordStats(GetSensitiveWordStatsReq) returns (GetSensitiveWordStatsResp);
|
||
rpc GetSensitiveWordLogStats(GetSensitiveWordLogStatsReq) returns (GetSensitiveWordLogStatsResp);
|
||
|
||
// ==================== 定时任务管理 ====================
|
||
rpc GetScheduledTasks(GetScheduledTasksReq) returns (GetScheduledTasksResp);
|
||
rpc DeleteScheduledTask(DeleteScheduledTaskReq) returns (DeleteScheduledTaskResp);
|
||
|
||
// ==================== 系统配置管理 ====================
|
||
rpc CreateSystemConfig(CreateSystemConfigReq) returns (CreateSystemConfigResp);
|
||
rpc GetSystemConfig(GetSystemConfigReq) returns (GetSystemConfigResp);
|
||
rpc GetAllSystemConfigs(GetAllSystemConfigsReq) returns (GetAllSystemConfigsResp);
|
||
rpc UpdateSystemConfig(UpdateSystemConfigReq) returns (UpdateSystemConfigResp);
|
||
rpc UpdateSystemConfigValue(UpdateSystemConfigValueReq) returns (UpdateSystemConfigValueResp);
|
||
rpc UpdateSystemConfigEnabled(UpdateSystemConfigEnabledReq) returns (UpdateSystemConfigEnabledResp);
|
||
rpc DeleteSystemConfig(DeleteSystemConfigReq) returns (DeleteSystemConfigResp);
|
||
rpc GetEnabledSystemConfigs(GetEnabledSystemConfigsReq) returns (GetEnabledSystemConfigsResp);
|
||
|
||
// ==================== 钱包管理相关 RPC ====================
|
||
|
||
// 获取用户钱包信息
|
||
rpc GetUserWallet(GetUserWalletReq) returns (GetUserWalletResp);
|
||
|
||
// 更新用户余额(后台充值/扣款)
|
||
rpc UpdateUserWalletBalance(UpdateUserWalletBalanceReq) returns (UpdateUserWalletBalanceResp);
|
||
|
||
// 获取用户余额变动记录列表
|
||
rpc GetUserWalletBalanceRecords(GetUserWalletBalanceRecordsReq) returns (GetUserWalletBalanceRecordsResp);
|
||
|
||
// 批量更新用户余额(后台批量充值/扣款)
|
||
rpc BatchUpdateWalletBalance(BatchUpdateWalletBalanceReq) returns (BatchUpdateWalletBalanceResp);
|
||
|
||
// 获取钱包列表
|
||
rpc GetWallets(GetWalletsReq) returns (GetWalletsResp);
|
||
|
||
// 修改用户支付密码(后台)
|
||
rpc UpdateUserPaymentPassword(UpdateUserPaymentPasswordReq) returns (UpdateUserPaymentPasswordResp);
|
||
|
||
// 设置用户提款账号(后台)
|
||
rpc SetUserWithdrawAccount(SetUserWithdrawAccountReq) returns (SetUserWithdrawAccountResp);
|
||
|
||
// ==================== 实名认证审核相关 RPC ====================
|
||
|
||
// 获取实名认证列表(支持按审核状态筛选)
|
||
rpc GetRealNameAuths(GetRealNameAuthsReq) returns (GetRealNameAuthsResp);
|
||
|
||
// 审核实名认证(通过/拒绝)
|
||
rpc AuditRealNameAuth(AuditRealNameAuthReq) returns (AuditRealNameAuthResp);
|
||
|
||
// ==================== 提现管理相关 RPC ====================
|
||
|
||
// 创建提现记录(用户端发起提现)
|
||
rpc CreateWithdraw(CreateWithdrawReq) returns (CreateWithdrawResp);
|
||
|
||
// 获取提现记录详情
|
||
rpc GetWithdraw(GetWithdrawReq) returns (GetWithdrawResp);
|
||
|
||
// 获取用户的提现记录列表
|
||
rpc GetUserWithdraws(GetUserWithdrawsReq) returns (GetUserWithdrawsResp);
|
||
|
||
// 获取提现记录列表(后台,支持按状态筛选)
|
||
rpc GetWithdraws(GetWithdrawsReq) returns (GetWithdrawsResp);
|
||
|
||
// 审核提现(后台)
|
||
rpc AuditWithdraw(AuditWithdrawReq) returns (AuditWithdrawResp);
|
||
|
||
// 系统统计
|
||
rpc GetStatistics(GetStatisticsReq) returns (GetStatisticsResp);
|
||
}
|
||
|
||
// ==================== 敏感词管理相关消息 ====================
|
||
|
||
// 敏感词信息
|
||
message SensitiveWordInfo {
|
||
string id = 1;
|
||
string word = 2;
|
||
int32 level = 3;
|
||
int32 type = 4;
|
||
int32 action = 5;
|
||
int32 status = 6;
|
||
string creator = 7;
|
||
string updater = 8;
|
||
int64 create_time = 9;
|
||
int64 update_time = 10;
|
||
string remark = 11;
|
||
}
|
||
|
||
// 敏感词分组信息
|
||
message SensitiveWordGroupInfo {
|
||
string id = 1;
|
||
string name = 2;
|
||
string remark = 3;
|
||
int64 create_time = 4;
|
||
int64 update_time = 5;
|
||
}
|
||
|
||
// 敏感词配置信息
|
||
message SensitiveWordConfigInfo {
|
||
string id = 1;
|
||
bool enable_filter = 2;
|
||
int32 filter_mode = 3;
|
||
string replace_char = 4;
|
||
repeated string whitelist_users = 5;
|
||
repeated string whitelist_groups = 6;
|
||
bool log_enabled = 7;
|
||
bool auto_approve = 8;
|
||
int64 update_time = 9;
|
||
}
|
||
|
||
// 敏感词日志信息
|
||
message SensitiveWordLogInfo {
|
||
string id = 1;
|
||
string user_id = 2;
|
||
string group_id = 3;
|
||
string content = 4;
|
||
repeated string matched_words = 5;
|
||
int32 action = 6;
|
||
string processed_text = 7;
|
||
int64 create_time = 8;
|
||
}
|
||
|
||
// 敏感词统计信息
|
||
message SensitiveWordStatsInfo {
|
||
int64 total = 1;
|
||
int64 enabled = 2;
|
||
int64 disabled = 3;
|
||
int64 replace = 4;
|
||
int64 block = 5;
|
||
}
|
||
|
||
// 敏感词日志统计信息
|
||
message SensitiveWordLogStatsInfo {
|
||
int64 total = 1;
|
||
int64 replace = 2;
|
||
int64 block = 3;
|
||
}
|
||
|
||
// ==================== 敏感词管理请求和响应 ====================
|
||
|
||
// 添加敏感词
|
||
message AddSensitiveWordReq {
|
||
string word = 1;
|
||
int32 level = 2;
|
||
int32 type = 3;
|
||
int32 action = 4;
|
||
int32 status = 5;
|
||
string remark = 6;
|
||
}
|
||
|
||
message AddSensitiveWordResp {}
|
||
|
||
// 更新敏感词
|
||
message UpdateSensitiveWordReq {
|
||
string id = 1;
|
||
string word = 2;
|
||
int32 level = 3;
|
||
int32 type = 4;
|
||
int32 action = 5;
|
||
int32 status = 6;
|
||
string remark = 7;
|
||
}
|
||
|
||
message UpdateSensitiveWordResp {}
|
||
|
||
// 删除敏感词
|
||
message DeleteSensitiveWordReq {
|
||
repeated string ids = 1;
|
||
}
|
||
|
||
message DeleteSensitiveWordResp {}
|
||
|
||
// 获取敏感词
|
||
message GetSensitiveWordReq {
|
||
string id = 1;
|
||
}
|
||
|
||
message GetSensitiveWordResp {
|
||
SensitiveWordInfo word = 1;
|
||
}
|
||
|
||
// 搜索敏感词
|
||
message SearchSensitiveWordsReq {
|
||
string keyword = 1;
|
||
int32 action = 2;
|
||
int32 status = 3;
|
||
openim.sdkws.RequestPagination pagination = 4;
|
||
}
|
||
|
||
message SearchSensitiveWordsResp {
|
||
int64 total = 1;
|
||
repeated SensitiveWordInfo words = 2;
|
||
}
|
||
|
||
// 批量添加敏感词
|
||
message BatchAddSensitiveWordsReq {
|
||
repeated SensitiveWordInfo words = 1;
|
||
}
|
||
|
||
message BatchAddSensitiveWordsResp {
|
||
repeated string ids = 1;
|
||
}
|
||
|
||
// 批量更新敏感词
|
||
message BatchUpdateSensitiveWordsReq {
|
||
map<string, SensitiveWordInfo> updates = 1;
|
||
}
|
||
|
||
message BatchUpdateSensitiveWordsResp {}
|
||
|
||
// 批量删除敏感词
|
||
message BatchDeleteSensitiveWordsReq {
|
||
repeated string ids = 1;
|
||
}
|
||
|
||
message BatchDeleteSensitiveWordsResp {}
|
||
|
||
// ==================== 敏感词分组管理请求和响应 ====================
|
||
|
||
// 添加敏感词分组
|
||
message AddSensitiveWordGroupReq {
|
||
string name = 1;
|
||
string remark = 2;
|
||
}
|
||
|
||
message AddSensitiveWordGroupResp {}
|
||
|
||
// 更新敏感词分组
|
||
message UpdateSensitiveWordGroupReq {
|
||
string id = 1;
|
||
string name = 2;
|
||
string remark = 3;
|
||
}
|
||
|
||
message UpdateSensitiveWordGroupResp {}
|
||
|
||
// 删除敏感词分组
|
||
message DeleteSensitiveWordGroupReq {
|
||
repeated string ids = 1;
|
||
}
|
||
|
||
message DeleteSensitiveWordGroupResp {}
|
||
|
||
// 获取敏感词分组
|
||
message GetSensitiveWordGroupReq {
|
||
string id = 1;
|
||
}
|
||
|
||
message GetSensitiveWordGroupResp {
|
||
SensitiveWordGroupInfo group = 1;
|
||
}
|
||
|
||
// 获取所有敏感词分组
|
||
message GetAllSensitiveWordGroupsReq {}
|
||
|
||
message GetAllSensitiveWordGroupsResp {
|
||
repeated SensitiveWordGroupInfo groups = 1;
|
||
}
|
||
|
||
// ==================== 敏感词配置管理请求和响应 ====================
|
||
|
||
// 获取敏感词配置
|
||
message GetSensitiveWordConfigReq {}
|
||
|
||
message GetSensitiveWordConfigResp {
|
||
SensitiveWordConfigInfo config = 1;
|
||
}
|
||
|
||
// 更新敏感词配置
|
||
message UpdateSensitiveWordConfigReq {
|
||
SensitiveWordConfigInfo config = 1;
|
||
}
|
||
|
||
message UpdateSensitiveWordConfigResp {}
|
||
|
||
// ==================== 敏感词日志管理请求和响应 ====================
|
||
|
||
// 获取敏感词日志
|
||
message GetSensitiveWordLogsReq {
|
||
string user_id = 1;
|
||
string group_id = 2;
|
||
openim.sdkws.RequestPagination pagination = 3;
|
||
}
|
||
|
||
message GetSensitiveWordLogsResp {
|
||
int64 total = 1;
|
||
repeated SensitiveWordLogInfo logs = 2;
|
||
}
|
||
|
||
// 用户登录记录信息
|
||
message UserLoginRecordInfo {
|
||
string user_id = 1; // 用户ID
|
||
int64 login_time = 2; // 登录时间(毫秒时间戳)
|
||
string ip = 3; // 登录IP
|
||
string device_id = 4; // 设备ID
|
||
string platform = 5; // 平台
|
||
string face_url = 6; // 用户头像
|
||
string nickname = 7; // 用户昵称
|
||
}
|
||
|
||
// 查询用户登录记录请求
|
||
message GetUserLoginRecordsReq {
|
||
string user_id = 1; // 用户ID(可选,如果提供则查询该用户的登录记录)
|
||
string ip = 2; // IP地址(可选,如果提供则查询使用该IP的所有登录记录)
|
||
openim.sdkws.RequestPagination pagination = 3; // 分页信息
|
||
}
|
||
|
||
// 查询用户登录记录响应
|
||
message GetUserLoginRecordsResp {
|
||
int64 total = 1; // 总数
|
||
repeated UserLoginRecordInfo records = 2; // 登录记录列表
|
||
}
|
||
|
||
// 删除敏感词日志
|
||
message DeleteSensitiveWordLogsReq {
|
||
repeated string ids = 1;
|
||
}
|
||
|
||
message DeleteSensitiveWordLogsResp {}
|
||
|
||
// ==================== 敏感词统计请求和响应 ====================
|
||
|
||
// 获取敏感词统计
|
||
message GetSensitiveWordStatsReq {}
|
||
|
||
message GetSensitiveWordStatsResp {
|
||
SensitiveWordStatsInfo stats = 1;
|
||
}
|
||
|
||
// 获取敏感词日志统计
|
||
message GetSensitiveWordLogStatsReq {
|
||
int64 start_time = 1;
|
||
int64 end_time = 2;
|
||
}
|
||
|
||
message GetSensitiveWordLogStatsResp {
|
||
SensitiveWordLogStatsInfo stats = 1;
|
||
}
|
||
|
||
// ==================== 定时任务管理请求和响应 ====================
|
||
|
||
// 获取定时任务列表请求
|
||
message GetScheduledTasksReq {
|
||
openim.sdkws.RequestPagination pagination = 1; // 分页信息
|
||
}
|
||
|
||
// 定时任务消息内容
|
||
message ScheduledTaskMessage {
|
||
int32 type = 1; // 消息类型:1-文本,2-图片,3-视频
|
||
string content = 2; // 消息内容(文本内容、图片URL、视频URL等)
|
||
string thumbnail = 3; // 缩略图URL(用于图片和视频)
|
||
int32 duration = 4; // 时长(秒,用于视频)
|
||
int64 fileSize = 5; // 文件大小(字节,用于图片和视频)
|
||
int32 width = 6; // 宽度(像素,用于图片和视频)
|
||
int32 height = 7; // 高度(像素,用于图片和视频)
|
||
}
|
||
|
||
// 定时任务信息
|
||
message ScheduledTaskInfo {
|
||
string id = 1; // 任务ID
|
||
string userID = 2; // 用户ID
|
||
string name = 3; // 任务名称
|
||
string cronExpression = 4; // Crontab表达式:分 时 日 月 周(例如:"0 9 * * *")
|
||
repeated ScheduledTaskMessage messages = 5; // 消息列表(支持多条消息一起发送)
|
||
repeated string recvIDs = 6; // 接收者ID列表(单聊,可以多个)
|
||
repeated string groupIDs = 7; // 群组ID列表(群聊,可以多个)
|
||
int32 status = 8; // 状态:0-已禁用,1-已启用
|
||
int64 createTime = 9; // 创建时间(毫秒时间戳)
|
||
int64 updateTime = 10; // 更新时间(毫秒时间戳)
|
||
}
|
||
|
||
// 获取定时任务列表响应
|
||
message GetScheduledTasksResp {
|
||
int64 total = 1; // 总数
|
||
repeated ScheduledTaskInfo tasks = 2; // 任务列表
|
||
}
|
||
|
||
// 删除定时任务请求
|
||
message DeleteScheduledTaskReq {
|
||
repeated string taskIDs = 1; // 任务ID列表
|
||
}
|
||
|
||
// 删除定时任务响应
|
||
message DeleteScheduledTaskResp {}
|
||
|
||
// ==================== 系统配置管理请求和响应 ====================
|
||
|
||
// 系统配置信息
|
||
message SystemConfigInfo {
|
||
string key = 1; // 配置键(唯一标识)
|
||
string title = 2; // 配置标题
|
||
string value = 3; // 配置值(字符串形式存储,根据ValueType解析)
|
||
int32 valueType = 4; // 配置值类型:1-字符串,2-数字,3-布尔,4-JSON
|
||
string description = 5; // 配置描述
|
||
bool enabled = 6; // 是否启用(用于开关类配置)
|
||
bool showInApp = 7; // 是否在APP端展示
|
||
int64 createTime = 8; // 创建时间(毫秒时间戳)
|
||
int64 updateTime = 9; // 更新时间(毫秒时间戳)
|
||
}
|
||
|
||
// 创建系统配置
|
||
message CreateSystemConfigReq {
|
||
string key = 1; // 配置键(唯一标识)
|
||
string title = 2; // 配置标题
|
||
string value = 3; // 配置值
|
||
int32 valueType = 4; // 配置值类型:1-字符串,2-数字,3-布尔,4-JSON
|
||
string description = 5; // 配置描述
|
||
bool enabled = 6; // 是否启用
|
||
bool showInApp = 7; // 是否在APP端展示(默认为false)
|
||
}
|
||
|
||
message CreateSystemConfigResp {}
|
||
|
||
// 获取系统配置
|
||
message GetSystemConfigReq {
|
||
string key = 1; // 配置键
|
||
}
|
||
|
||
message GetSystemConfigResp {
|
||
SystemConfigInfo config = 1; // 配置信息
|
||
}
|
||
|
||
// 获取所有系统配置(分页)
|
||
message GetAllSystemConfigsReq {
|
||
openim.sdkws.RequestPagination pagination = 1; // 分页信息
|
||
}
|
||
|
||
message GetAllSystemConfigsResp {
|
||
uint32 total = 1; // 总数
|
||
repeated SystemConfigInfo list = 2; // 配置列表
|
||
}
|
||
|
||
// 更新系统配置
|
||
message UpdateSystemConfigReq {
|
||
string key = 1; // 配置键
|
||
openim.protobuf.StringValue title = 2; // 配置标题(可选)
|
||
openim.protobuf.StringValue value = 3; // 配置值(可选)
|
||
openim.protobuf.Int32Value valueType = 4; // 配置值类型(可选)
|
||
openim.protobuf.StringValue description = 5; // 配置描述(可选)
|
||
openim.protobuf.BoolValue enabled = 6; // 是否启用(可选)
|
||
openim.protobuf.BoolValue showInApp = 7; // 是否在APP端展示(可选)
|
||
}
|
||
|
||
message UpdateSystemConfigResp {}
|
||
|
||
// 更新系统配置值
|
||
message UpdateSystemConfigValueReq {
|
||
string key = 1; // 配置键
|
||
string value = 2; // 配置值
|
||
}
|
||
|
||
message UpdateSystemConfigValueResp {}
|
||
|
||
// 更新系统配置启用状态
|
||
message UpdateSystemConfigEnabledReq {
|
||
string key = 1; // 配置键
|
||
bool enabled = 2; // 是否启用
|
||
}
|
||
|
||
message UpdateSystemConfigEnabledResp {}
|
||
|
||
// 删除系统配置
|
||
message DeleteSystemConfigReq {
|
||
repeated string keys = 1; // 配置键列表
|
||
}
|
||
|
||
message DeleteSystemConfigResp {}
|
||
|
||
// 获取所有已启用的配置
|
||
message GetEnabledSystemConfigsReq {}
|
||
|
||
message GetEnabledSystemConfigsResp {
|
||
repeated SystemConfigInfo list = 1; // 配置列表
|
||
}
|
||
|
||
// ==================== 钱包管理相关消息 ====================
|
||
|
||
// 实名认证信息
|
||
message RealNameAuthInfo {
|
||
string idCard = 1; // 身份证号
|
||
string name = 2; // 真实姓名
|
||
string idCardPhotoFront = 3; // 身份证正面照片URL
|
||
string idCardPhotoBack = 4; // 身份证反面照片URL
|
||
int32 auditStatus = 5; // 审核状态:0-未审核,1-审核通过,2-审核拒绝
|
||
}
|
||
|
||
// 钱包信息
|
||
message WalletInfo {
|
||
string userID = 1; // 用户ID
|
||
int64 balance = 2; // 余额(单位:分)
|
||
string withdrawAccount = 3; // 提现账号
|
||
RealNameAuthInfo realNameAuth = 4; // 实名认证信息
|
||
string withdrawReceiveAccount = 5; // 提现收款账号
|
||
bool hasPaymentPassword = 6; // 是否已设置支付密码
|
||
int64 createTime = 7; // 创建时间(毫秒时间戳)
|
||
int64 updateTime = 8; // 更新时间(毫秒时间戳)
|
||
}
|
||
|
||
// 余额变动记录信息
|
||
message WalletBalanceRecordInfo {
|
||
string id = 1; // 记录ID
|
||
string userID = 2; // 用户ID
|
||
int64 amount = 3; // 变动金额(单位:分,正数表示增加,负数表示减少)
|
||
int32 type = 4; // 变动类型:1-充值,2-提现/提款,3-消费,4-退款,5-奖励,6-后台充值,7-发红包,8-抢红包,99-其他
|
||
int64 beforeBalance = 5; // 变动前余额(单位:分)
|
||
int64 afterBalance = 6; // 变动后余额(单位:分)
|
||
string orderID = 7; // 关联订单ID(可选)
|
||
string transactionID = 8; // 交易ID(可选)
|
||
string redPacketID = 9; // 红包ID(可选)
|
||
string remark = 10; // 备注
|
||
int64 createTime = 11; // 创建时间(毫秒时间戳)
|
||
}
|
||
|
||
// 获取用户钱包信息请求
|
||
message GetUserWalletReq {
|
||
string userID = 1; // 用户ID
|
||
}
|
||
|
||
// 获取用户钱包信息响应
|
||
message GetUserWalletResp {
|
||
WalletInfo wallet = 1; // 钱包信息
|
||
}
|
||
|
||
// 更新用户余额请求
|
||
message UpdateUserWalletBalanceReq {
|
||
string userID = 1; // 用户ID
|
||
int64 amount = 2; // 变动金额(单位:分,正数表示增加,负数表示减少)
|
||
int32 type = 3; // 变动类型:6-后台充值,99-其他(后台操作)
|
||
string remark = 4; // 备注
|
||
string operationPassword = 5; // 操作密码(超级管理员必须提供并验证)
|
||
}
|
||
|
||
// 更新用户余额响应
|
||
message UpdateUserWalletBalanceResp {
|
||
int64 balance = 1; // 更新后的余额(单位:分)
|
||
}
|
||
|
||
// 获取用户余额变动记录列表请求
|
||
message GetUserWalletBalanceRecordsReq {
|
||
string userID = 1; // 用户ID
|
||
openim.sdkws.RequestPagination pagination = 2; // 分页信息
|
||
}
|
||
|
||
// 获取用户余额变动记录列表响应
|
||
message GetUserWalletBalanceRecordsResp {
|
||
uint32 total = 1; // 总数
|
||
repeated WalletBalanceRecordInfo list = 2; // 记录列表
|
||
}
|
||
|
||
// 修改用户支付密码请求
|
||
message UpdateUserPaymentPasswordReq {
|
||
string userID = 1; // 用户ID
|
||
string paymentPassword = 2; // 新的支付密码(需要加密后存储)
|
||
}
|
||
|
||
// 修改用户支付密码响应
|
||
message UpdateUserPaymentPasswordResp {}
|
||
|
||
// 设置用户提款账号请求
|
||
message SetUserWithdrawAccountReq {
|
||
string userID = 1; // 用户ID
|
||
string withdrawAccount = 2; // 提款账号
|
||
}
|
||
|
||
// 设置用户提款账号响应
|
||
message SetUserWithdrawAccountResp {}
|
||
|
||
// 批量更新用户余额请求 - 单个用户的操作项
|
||
message BatchUpdateUserItem {
|
||
string userID = 1; // 用户ID(选填,与 phoneNumber/account 至少提供一个)
|
||
string phoneNumber = 2; // 手机号(选填)
|
||
string account = 3; // 账号(选填)
|
||
int64 amount = 4; // 金额(分)(选填,如果不填则使用默认金额)
|
||
string operation = 5; // 操作类型(选填,如果不填则使用默认操作):set/add/subtract
|
||
string remark = 6; // 备注信息(选填)
|
||
}
|
||
|
||
// 批量更新用户余额请求
|
||
message BatchUpdateWalletBalanceReq {
|
||
repeated BatchUpdateUserItem users = 1; // 用户列表(必填)
|
||
int64 amount = 2; // 默认金额(分),用户未指定时使用此值
|
||
string operation = 3; // 默认操作类型:set/add/subtract,默认为add
|
||
string operationPassword = 4; // 操作密码(超级管理员必须提供并验证)
|
||
}
|
||
|
||
// 批量更新用户余额响应 - 单个用户的结果
|
||
message BatchUpdateResultItem {
|
||
string userID = 1; // 用户ID
|
||
string phoneNumber = 2; // 手机号
|
||
string account = 3; // 账号
|
||
bool success = 4; // 是否成功
|
||
string message = 5; // 结果消息
|
||
int64 oldBalance = 6; // 修改前余额(分)
|
||
int64 newBalance = 7; // 修改后余额(分)
|
||
string remark = 8; // 备注信息
|
||
}
|
||
|
||
// 批量更新用户余额响应
|
||
message BatchUpdateWalletBalanceResp {
|
||
uint32 total = 1; // 总处理数量
|
||
uint32 success = 2; // 成功数量
|
||
uint32 failed = 3; // 失败数量
|
||
repeated BatchUpdateResultItem results = 4; // 结果列表
|
||
}
|
||
|
||
// 获取钱包列表请求
|
||
message GetWalletsReq {
|
||
string userID = 1; // 用户ID(选填,支持精确查询)
|
||
string phoneNumber = 2; // 手机号(选填,支持模糊搜索)
|
||
string account = 3; // 账号(选填,支持模糊搜索)
|
||
openim.sdkws.RequestPagination pagination = 4; // 分页信息
|
||
}
|
||
|
||
// 钱包列表项信息
|
||
message WalletListItemInfo {
|
||
string userID = 1; // 用户ID
|
||
string nickname = 2; // 用户昵称
|
||
string faceURL = 3; // 用户头像
|
||
int64 balance = 4; // 余额(分)
|
||
int64 createTime = 5; // 创建时间戳(毫秒)
|
||
int64 updateTime = 6; // 更新时间戳(毫秒)
|
||
}
|
||
|
||
// 获取钱包列表响应
|
||
message GetWalletsResp {
|
||
uint32 total = 1; // 总数
|
||
repeated WalletListItemInfo wallets = 2; // 钱包列表
|
||
}
|
||
|
||
// ==================== 提现管理相关消息 ====================
|
||
|
||
// 提现记录信息
|
||
message WithdrawInfo {
|
||
string id = 1; // 提现ID
|
||
string userID = 2; // 用户ID
|
||
int64 amount = 3; // 提现金额(单位:分)
|
||
string withdrawAccount = 4; // 提现账号
|
||
int32 status = 5; // 审核状态:1-待审核,2-已通过,3-已拒绝
|
||
string auditorID = 6; // 审核人ID(管理员ID)
|
||
int64 auditTime = 7; // 审核时间(毫秒时间戳)
|
||
string auditRemark = 8; // 审核备注
|
||
string ip = 9; // 提现IP
|
||
string deviceID = 10; // 设备ID
|
||
string platform = 11; // 平台(iOS、Android、Web等)
|
||
string deviceModel = 12; // 设备型号
|
||
string deviceBrand = 13; // 设备品牌
|
||
string osVersion = 14; // 操作系统版本
|
||
string appVersion = 15; // 应用版本
|
||
int64 createTime = 16; // 创建时间(毫秒时间戳)
|
||
int64 updateTime = 17; // 更新时间(毫秒时间戳)
|
||
RealNameAuthInfo realNameAuth = 18; // 用户实名认证信息
|
||
}
|
||
|
||
// 创建提现记录请求
|
||
message CreateWithdrawReq {
|
||
string userID = 1; // 用户ID
|
||
int64 amount = 2; // 提现金额(单位:分)
|
||
string withdrawAccount = 3; // 提现账号
|
||
string ip = 4; // 提现IP
|
||
string deviceID = 5; // 设备ID
|
||
string platform = 6; // 平台
|
||
string deviceModel = 7; // 设备型号
|
||
string deviceBrand = 8; // 设备品牌
|
||
string osVersion = 9; // 操作系统版本
|
||
string appVersion = 10; // 应用版本
|
||
}
|
||
|
||
// 创建提现记录响应
|
||
message CreateWithdrawResp {
|
||
string withdrawID = 1; // 提现ID
|
||
}
|
||
|
||
// 获取提现记录详情请求
|
||
message GetWithdrawReq {
|
||
string withdrawID = 1; // 提现ID
|
||
}
|
||
|
||
// 获取提现记录详情响应
|
||
message GetWithdrawResp {
|
||
WithdrawInfo withdraw = 1; // 提现记录信息
|
||
}
|
||
|
||
// 获取用户的提现记录列表请求
|
||
message GetUserWithdrawsReq {
|
||
string userID = 1; // 用户ID
|
||
openim.sdkws.RequestPagination pagination = 2; // 分页信息
|
||
}
|
||
|
||
// 获取用户的提现记录列表响应
|
||
message GetUserWithdrawsResp {
|
||
uint32 total = 1; // 总数
|
||
repeated WithdrawInfo list = 2; // 提现记录列表
|
||
}
|
||
|
||
// 获取提现记录列表请求(后台)
|
||
message GetWithdrawsReq {
|
||
int32 status = 1; // 状态筛选(0表示全部)
|
||
openim.sdkws.RequestPagination pagination = 2; // 分页信息
|
||
}
|
||
|
||
// 获取提现记录列表响应(后台)
|
||
message GetWithdrawsResp {
|
||
uint32 total = 1; // 总数
|
||
repeated WithdrawInfo list = 2; // 提现记录列表
|
||
}
|
||
|
||
// 审核提现请求
|
||
message AuditWithdrawReq {
|
||
repeated string withdrawIDs = 1; // 提现申请ID列表(支持批量审核)
|
||
int32 status = 2; // 审核状态:2-已通过,3-已拒绝
|
||
string auditRemark = 3; // 审核备注
|
||
}
|
||
|
||
// 审核提现响应
|
||
message AuditWithdrawResp {
|
||
uint32 successCount = 1; // 成功审核的数量
|
||
uint32 failCount = 2; // 失败审核的数量
|
||
repeated string failedIDs = 3; // 失败的提现申请ID列表
|
||
}
|
||
|
||
// ==================== 实名认证审核相关消息 ====================
|
||
|
||
// 获取实名认证列表请求
|
||
message GetRealNameAuthsReq {
|
||
int32 auditStatus = 1; // 审核状态筛选(0-未审核,1-审核通过,2-审核拒绝,0表示全部)
|
||
string userID = 3; // 用户ID搜索(可选,为空时不过滤)
|
||
openim.sdkws.RequestPagination pagination = 2; // 分页信息
|
||
}
|
||
|
||
// 实名认证列表项信息
|
||
message RealNameAuthListItemInfo {
|
||
string userID = 1; // 用户ID
|
||
string nickname = 2; // 用户昵称
|
||
string faceURL = 3; // 用户头像
|
||
string idCard = 4; // 身份证号
|
||
string name = 5; // 真实姓名
|
||
string idCardPhotoFront = 6; // 身份证正面照片URL
|
||
string idCardPhotoBack = 7; // 身份证反面照片URL
|
||
int32 auditStatus = 8; // 审核状态:0-未审核,1-审核通过,2-审核拒绝
|
||
int64 createTime = 9; // 创建时间戳(毫秒)
|
||
int64 updateTime = 10; // 更新时间戳(毫秒)
|
||
}
|
||
|
||
// 获取实名认证列表响应
|
||
message GetRealNameAuthsResp {
|
||
uint32 total = 1; // 总数
|
||
repeated RealNameAuthListItemInfo list = 2; // 实名认证列表
|
||
}
|
||
|
||
// 审核实名认证请求
|
||
message AuditRealNameAuthReq {
|
||
string userID = 1; // 用户ID
|
||
int32 auditStatus = 2; // 审核状态:1-审核通过,2-审核拒绝
|
||
string auditRemark = 3; // 审核备注(可选)
|
||
}
|
||
|
||
// 审核实名认证响应
|
||
message AuditRealNameAuthResp {}
|
||
|
||
// ==================== 系统统计请求和响应 ====================
|
||
|
||
// 获取系统统计数据
|
||
message GetStatisticsReq {}
|
||
|
||
message GetStatisticsResp {
|
||
int64 totalUsers = 1; // 用户总数
|
||
int64 todayRegisteredUsers = 2; // 今天注册的用户数
|
||
int64 todayActiveUsers = 3; // 今天活跃用户数(今天登录的用户数)
|
||
int64 todayMessages = 4; // 今天发送消息总数
|
||
int64 totalMessages = 5; // 历史发送的消息总数
|
||
int64 totalGroups = 6; // 群聊总数
|
||
int64 totalFriends = 7; // 好友关系总数
|
||
int64 onlineUsers = 8; // 当前在线用户数
|
||
int64 todayNewGroups = 9; // 今天新建群聊数
|
||
}
|