You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

990 lines
30 KiB

syntax = "proto3";
option go_package = ".;pb";
import "api/api_db.proto";
import "echomeet/echomeet_db.proto";
import "pay/pay_db.proto";
import "db.proto";
import "enum.proto";
//获取站点信息(公开接口,用于前端显示站点名称和版本号)
message ApiGetSiteInfoReq {
}
message ApiGetSiteInfoResp {
string sitename = 1; //@go_tags(`json:"sitename"`) 后台站点名称
int32 currency_type = 2; //@go_tags(`json:"currency_type"`) 货币类型:0=人民币(元) 1=美元(USD)
}
//登录
message ApiLoginReq {
string account = 1;
string password = 2;
}
message ApiLoginResp {
string account = 1; //@go_tags(`json:"account"`)
Identity identity = 2; //@go_tags(`json:"identity"`)
string token = 4; //@go_tags(`json:"token"`)
string access = 5; //@go_tags(`json:"access"`)
string avatar = 6; //@go_tags(`json:"avatar"`)
string factoryids = 7; //@go_tags(`json:"factoryids"`) 所属工厂列表,逗号分割
string productids = 8; //@go_tags(`json:"productids"`) 所属产品列表,逗号分割(代理用)
}
//获取配置
message ApiGetConfigReq {
}
message ApiGetConfigResp {
repeated DBAppConfigItem config = 1;
}
//添加配置
message ApiAddConfigReq {
DBAppConfigItem config = 1;
}
message ApiAddConfigResp {
}
//更新配置
message ApiUpdateConfigReq {
DBAppConfigItem config = 1;
}
message ApiUpdateConfigResp {
}
//删除配置
message ApiDelConfigReq {
uint64 id = 1;
}
message ApiDelConfigResp {
}
//获取智能体
message ApiGetAgentReq {
string id = 1;
}
message ApiGetAgentResp {
DBAgent agent = 1;
}
//获取智能体
message ApiGetAgentsReq {
}
message ApiGetAgentsResp {
repeated DBAgent agents = 1;
}
//获取智能体
message ApiAddAgentReq {
DBAgent agent = 1;
}
message ApiAddAgentResp {
}
//获取智能体
message ApiUpdateAgentReq {
DBAgent agent = 1;
}
message ApiUpdateAgentResp {
}
//删除智能体
message ApiDelAgentReq {
string id = 1;
}
message ApiDelAgentResp {
}
message ApiGetMcpServersReq {
Region region = 1;
}
message ApiGetMcpServersResp {
repeated DBMcpServer servers = 1;
}
message ApiGetMcpServerReq {
string id = 1;
}
message ApiGetMcpServerResp {
DBMcpServer server = 1;
}
message ApiAddMcpServersReq {
repeated DBMcpServer servers = 1;
}
message ApiAddMcpServersResp {
}
message ApiUpdateMcpServersReq {
repeated DBMcpServer servers = 1;
}
message ApiUPdateMcpServerResp {
}
message ApiDelMcpServersReq {
repeated string ids = 1;
}
message ApiDelMcpServerResp {
}
/*方案商管理--------------------------------------------------------------------------------*/
//获取方案商列表
message ApiGetSolutionProvidersReq {
}
message ApiGetSolutionProvidersResp {
repeated DBSolutionProvider providers = 1;
}
//获取方案商信息
message ApiGetSolutionProviderReq {
uint32 id = 1;
}
message ApiGetSolutionProviderResp {
DBSolutionProvider provider = 1;
}
//添加方案商
message ApiAddSolutionProviderReq {
DBSolutionProvider provider = 1;
}
message ApiAddSolutionProviderResp {
DBSolutionProvider provider = 1;
}
//更新方案商
message ApiUpdateSolutionProviderReq {
DBSolutionProvider provider = 1;
}
message ApiUpdateSolutionProviderResp {
DBSolutionProvider provider = 1;
}
//删除方案商
message ApiDelSolutionProviderReq {
uint32 id = 1;
}
message ApiDelSolutionProviderResp {
uint32 id = 1;
}
/*品牌商管理--------------------------------------------------------------------------------*/
//获取品牌商列表
message ApiGetBrandsReq {
}
message ApiGetBrandsResp {
repeated DBBrand brands = 1;
}
//获取品牌商信息
message ApiGetBrandReq {
uint32 id = 1;
}
message ApiGetBrandResp {
DBBrand brand = 1;
}
//添加品牌商信息
message ApiAddBrandReq {
DBBrand brand = 1;
}
message ApiAddBrandResp {
DBBrand brand = 1;
}
//更新品牌商信息
message ApiUpdateBrandReq {
DBBrand brand = 1;
}
message ApiUpdateBrandResp {
DBBrand brand = 1;
}
//删除品牌商信息
message ApiDelBrandReq {
uint32 id = 1;
}
message ApiDelBrandResp {
uint32 id = 1;
}
/*厂商设备管理--------------------------------------------------------------------------------*/
message ApiGetProductsReq {
}
message ApiGetProductsResp {
repeated DBProduct products = 1;
}
//获取设备列表
message ApiGetProductReq {
uint32 id = 1;
}
message ApiGetProductResp {
DBProduct product = 1;
}
//获取设备列表
message ApiAddProductReq {
DBProduct product = 1;
}
message ApiAddProductResp {
DBProduct product = 1;
}
message ApiUpdateProductReq{
DBProduct product = 1;
}
message ApiUpdateProductResp{
}
message ApiDelProductReq {
uint32 id = 1;
}
message ApiDelProductResp {
}
message ApiAddProductVersionReq{
DBProductVersion version = 1;
bool isuse = 2; //是否使用当前版本
}
message ApiAddProductVersionResp{
DBProductVersion version = 1;
}
message ApiGetProductVersionsReq{
uint32 pid = 1;
}
message ApiGetProductVersionsResp{
repeated DBProductVersion versions = 1;
}
message ApiDelProductVersionReq{
uint32 id = 1;
}
message ApiDelProductVersionResp{
}
//获取渠道包
message ApiGetChannelAppsReq {
}
message ApiGetChannelAppsResp {
repeated DBChannelApp apps = 1;
}
//获取设备列表
message ApiGetChannelAppReq {
int32 channel = 1;
}
message ApiGetChannelAppResp {
DBChannelApp app = 1;
}
//添加渠道包
message ApiAddChannelAppReq {
DBChannelApp app = 1;
}
message ApiAddChannelAppResp {
}
message ApiUploadChannelAppReq{
DBChannelApp app = 1;
}
message ApiUploadChannelAppResp{
}
message ApiDelChannelAppReq {
int32 channel = 1;
}
message ApiDelChannelAppResp {
}
//授权码生产管理----------------------------------------------------------------
message ApiCreateAuthCodesReq {
uint32 brandid = 1; //@go_tags(`json:"brandid"`) 品牌商id
uint32 productid = 2; //@go_tags(`json:"productid"`) 设备类型
int32 createtype = 3; //@go_tags(`json:"createtype"`) 生成类型 1 生产模式 2 导入模式
uint32 number = 4; //@go_tags(`json:"number"`) 生成的授权码数量
bool isbindmac = 5; //@go_tags(`json:"isbindmac"`) 是否绑定mac地址
string macaddresses = 6; //@go_tags(`json:"macaddresses"`) 自定义mac地址
string remark = 7; //@go_tags(`json:"remark"`) 批次备注
string batchno = 8; //@go_tags(`json:"batchno"`) 可选:预分配批次号(预览确认流程回传,空=服务端生成)
}
message ApiCreateAuthCodesResp {
uint32 brandid = 1; //@go_tags(`json:"brandid"`) 品牌商id
uint32 productid = 2; //@go_tags(`json:"productid"`) 产品id
string batchno = 3; //@go_tags(`json:"batchno"`) 生产批次号(短码)
string startmac = 4; //开始mac地址
string endmac = 5; //结束mac地址
int64 serialstart = 6; //@go_tags(`json:"serialstart"`) 序号区间起
int64 serialend = 7; //@go_tags(`json:"serialend"`) 序号区间止
uint32 number = 8; //设备数量
repeated DBAuthCode devices = 9; //@go_tags(`json:"devices"`) //授权码列表
}
// 撤销生产批次 仅超管可用 已被使用的批次禁止撤销
message ApiRevokeProductionBatchReq {
uint32 productid = 1; //@go_tags(`json:"productid"`) 产品id
string batchno = 2; //@go_tags(`json:"batchno"`) 批次号(短码)
}
message ApiRevokeProductionBatchResp {
uint32 deleted = 1; //@go_tags(`json:"deleted"`) 删除的设备码数量
}
// 批量禁用/恢复授权码 授权码被禁用后绑定会被拒绝
message ApiDisableAuthCodesReq {
uint32 productid = 1; //@go_tags(`json:"productid"`) 产品id
repeated string codes = 2; //@go_tags(`json:"codes"`) 待操作的授权码列表
int32 disabled = 3; //@go_tags(`json:"disabled"`) 目标状态 0:恢复正常 -1:禁用
}
message ApiDisableAuthCodesResp {
int64 affected = 1; //@go_tags(`json:"affected"`) 实际更新条数
}
message ApiGetAuthCodesReq {
string devicemac = 1;
uint32 brandid =2;
uint32 productid = 3;
string batchno = 4; //@go_tags(`json:"batchno"`) 批次号(短码)
int32 status = 6;
string uid = 7;
string sortby = 8; //排序字段:usedtime / createtime,默认 createtime
string order = 9; //asc / desc,默认 desc
int32 limit = 10; //限制条数,默认 200,最大 2000
int32 offset = 11; //偏移
string code = 12; //授权码(精确匹配)
}
message ApiGetAuthCodesResp {
repeated DBAuthCode devices = 1; //@go_tags(`json:"devices"`) //授权码列表
int64 total = 2; //@go_tags(`json:"total"`) //命中总条数
}
message ApiGetAuthCodeReq {
uint32 productid = 1; //@go_tags(`json:"productid"`) 设备类型
string devicemac = 2; //@go_tags(`json:"code"`) //渠道
}
message ApiGetAuthCodeResp {
DBAuthCode device = 1; //@go_tags(`json:"device"`) //授权码列表
}
//厂家公码----------------------------------------------------------------
//创建厂家公码(一厂家可多码,每次调用生成一条新码)
message ApiCreateFactoryPublicCodeReq {
uint32 brandid = 1; //@go_tags(`json:"brandid"`) 品牌商id
uint32 productid = 2; //@go_tags(`json:"productid"`) 关联产品id(仅作分类,可填 0)
string remark = 3; //@go_tags(`json:"remark"`) 备注
uint32 maxuses = 4; //@go_tags(`json:"maxuses"`) 最大核销人数 0=不限
int64 expiretime = 5; //@go_tags(`json:"expiretime"`) 失效时间戳 0=永久
uint32 bindrewardvpitime = 6; //@go_tags(`json:"bindrewardvpitime"`) 奖励VIP天数
uint32 bindrewardtranslate = 7; //@go_tags(`json:"bindrewardtranslate"`) 奖励翻译分钟数
uint32 bindrewardmeeting = 8; //@go_tags(`json:"bindrewardmeeting"`) 奖励会议分钟数
}
message ApiCreateFactoryPublicCodeResp {
DBFactoryPublicCode code = 1; //@go_tags(`json:"code"`) 公码信息
}
//查询厂家公码列表
message ApiGetFactoryPublicCodesReq {
uint32 brandid = 1; //@go_tags(`json:"brandid"`) 品牌商id 0=全部
int32 status = 2; //@go_tags(`json:"status"`) 状态过滤 -1=不过滤 0:启用 1:停用
}
message ApiGetFactoryPublicCodesResp {
repeated DBFactoryPublicCode codes = 1; //@go_tags(`json:"codes"`) 公码列表
}
//更新厂家公码(按 code 主键定位;不传的奖励字段保持原值由前端回填)
message ApiUpdateFactoryPublicCodeReq {
string code = 1; //@go_tags(`json:"code"`) 公码(必填)
uint32 productid = 2; //@go_tags(`json:"productid"`) 关联产品id
string remark = 3; //@go_tags(`json:"remark"`) 备注
int32 status = 4; //@go_tags(`json:"status"`) 状态 0:启用 1:停用
uint32 maxuses = 5; //@go_tags(`json:"maxuses"`) 最大核销人数 0=不限
int64 expiretime = 6; //@go_tags(`json:"expiretime"`) 失效时间戳 0=永久
uint32 bindrewardvpitime = 7; //@go_tags(`json:"bindrewardvpitime"`) 奖励VIP天数
uint32 bindrewardtranslate = 8; //@go_tags(`json:"bindrewardtranslate"`) 奖励翻译分钟数
uint32 bindrewardmeeting = 9; //@go_tags(`json:"bindrewardmeeting"`) 奖励会议分钟数
}
message ApiUpdateFactoryPublicCodeResp {
DBFactoryPublicCode code = 1; //@go_tags(`json:"code"`) 公码信息
}
//删除厂家公码(删除后该 code 无法再被领取,已领取记录保留)
message ApiDelFactoryPublicCodeReq {
string code = 1; //@go_tags(`json:"code"`) 公码
}
message ApiDelFactoryPublicCodeResp {
}
//发送邮件
message ApiSendsmtpemailReq{
string to = 1;
string subject = 2;
string content = 3;
string cc = 4;
string bcc = 5;
}
message ApiSendsmtpemailResp{
}
//重置设备
message ApiRestUserDevicsReq{
uint32 productid = 1; //@go_tags(`json:"productid"`) 设备id
string uid = 2; //@go_tags(`json:"uid"`) 用户id
}
message ApiRestUserDevicsResp{
}
//会议记录模板管理---------------------------------------------------------------------
message ApiGetTemplatesReq{
}
message ApiGetTemplatesResp{
repeated DBEchoMeetTemplate templates = 1; //@go_tags(`json:"templates"`) //会议记录模板列表(不含 outline / template 大文本)
}
message ApiGetTemplateReq{
uint64 id = 1; //@go_tags(`json:"id"`) //模板id
}
message ApiGetTemplateResp{
DBEchoMeetTemplate template = 1; //@go_tags(`json:"template"`) //会议记录模板详情
}
message ApiAddTemplatesReq{
repeated DBEchoMeetTemplate templates = 1; //@go_tags(`json:"templates"`) //会议记录模板
}
message ApiAddTemplateResp{
}
message ApiUpdateTemplatesReq{
repeated DBEchoMeetTemplate templates = 1; //@go_tags(`json:"templates"`) //会议记录模板
}
message ApiUpdateTemplateResp{
}
message ApiDelTemplateReq{
repeated uint64 ids = 1; //@go_tags(`json:"ids"`) //会议记录模板id列表
}
message ApiDelTemplateResp{
}
// 支付商品管理---------------------------------------------------------------------
message ApiGetGoodssReq{
}
message ApiGetGoodssResp{
repeated DBGoods goodss = 1; //@go_tags(`json:"goodss"`) //支付商品列表
}
message ApiGetGoodsReq{
string id =1; //@go_tags(`json:"id"`) //支付商品id
}
message ApiGetGoodsResp{
DBGoods goods = 1; //@go_tags(`json:"goods"`) //支付商品列表
}
message ApiAddGoodsReq{
DBGoods goods = 1; //@go_tags(`json:"goods"`) //支付商品
}
message ApiAddGoodsResp{
}
message ApiUpdateGoodsReq{
DBGoods goods = 1; //@go_tags(`json:"goods"`) //支付商品
}
message ApiUpdateGoodsResp{
}
message ApiDelGoodsReq{
string id = 1; //@go_tags(`json:"id"`) //支付商品id
}
message ApiDelGoodsResp{
}
//唤醒词管理---------------------------------------------------------------------
message ApiGetWakeupVoicesReq{
}
message ApiGetWakeupVoicesResp{
repeated DBWakeupVoice voices = 1;
}
message ApiGetWakeupVoiceReq{
uint32 id = 1; //@go_tags(`json:"id"`) //唤醒语音id
}
message ApiGetWakeupVoiceResp{
DBWakeupVoice voice = 1; //@go_tags(`json:"voice"`) //唤醒语音
}
message ApiAddWakeupVoiceReq{
DBWakeupVoice voice = 1; //@go_tags(`json:"voice"`) //唤醒语音
}
message ApiAddWakeupVoiceResp{
}
message ApiUpdateWakeupVoiceReq{
DBWakeupVoice voice = 1; //@go_tags(`json:"voice"`) //唤醒语音
}
message ApiUpdateWakeupVoiceResp{
}
message ApiDelWakeupVoiceReq{
uint32 id = 1; //@go_tags(`json:"id"`) //唤醒语音id
}
message ApiDelWakeupVoiceResp{
}
message ApiGetPayOrdersReq{
string uid = 1; //@go_tags(`json:"uid"`) //用户id
int32 status = 2; //@go_tags(`json:"status"`) //支付状态
int32 start = 3; //@go_tags(`json:"start"`) //开始时间
int32 end = 4; //@go_tags(`json:"end"`) //结束时间
int32 page = 5; //@go_tags(`json:"page"`) //页码(从1开始)
int32 size = 6; //@go_tags(`json:"size"`) //每页数量
}
message ApiGetPayOrdersResp{
repeated DBPayOrder orders = 1; //@go_tags(`json:"orders"`) //支付订单列表
int64 total = 2; //@go_tags(`json:"total"`) //总数
}
message ApiGetUserReq{
int32 searchtype = 1; //@go_tags(`json:"searchtype"`) //搜索类型 0 uid 1 手机号吗 2 邮箱
string searchvalue = 2; //@go_tags(`json:"searchvalue"`) //用户id或手机号或邮箱
}
message ApiGetUserResp{
DBUser user = 1; //@go_tags(`json:"user"`) //用户信息
}
message ApiUpdateUserReq{
DBUser user = 1; //@go_tags(`json:"user"`) //用户信息
}
message ApiUpdateUserResp{
}
//派发资源
message ApiDispatchResourceReq{
string uid = 1; //@go_tags(`json:"uid"`) //用户id
int32 vipday = 2; //@go_tags(`json:"vipday"`) //vip天数
int32 transtime = 3; //@go_tags(`json:"transtime"`) //翻译时长 分钟
int32 meettime = 4; //@go_tags(`json:"meettime"`) //会议时长 分钟
int64 aichatintegral = 5; //@go_tags(`json:"aichatintegral"`) //AI资源点
}
message ApiDispatchResourceResp{
DBUser user = 1; //@go_tags(`json:"user"`) //用户信息
}
//查询用户会议记录
message ApiGetUserEchomeetRecordsReq{
string uid = 1; //@go_tags(`json:"uid"`) //用户id
int64 start = 2; //@go_tags(`json:"start"`) //开始时间 unix 秒
int64 end = 3; //@go_tags(`json:"end"`) //结束时间 unix 秒
}
message ApiGetUserEchomeetRecordsResp{
repeated DBEchoMeetRecord records = 1; //@go_tags(`json:"records"`) //会议记录列表
}
//用户使用量日志
message ApiGetUserUseLogsReq{
string uid = 1; //@go_tags(`json:"uid"`) //用户id
UserLogType usagetype = 2; //@go_tags(`json:"usagetype"`) //使用量类型
int64 start = 3; //@go_tags(`json:"start"`) //开始时间
int64 end = 4; //@go_tags(`json:"end"`) //结束时间
}
message ApiGetUserUseLogsResp{
repeated DBUserUseLog logs = 1; //@go_tags(`json:"logs"`) //用户使用量日志列表
}
//重置License状态
message ApiResetLicenseStatusReq{
string license = 1; //@go_tags(`json:"licenses"`) //license列表
}
message ApiResetLicenseStatusResp{
}
//批量重置License状态
message ApiBatchResetLicenseStatusReq{
repeated string licenses = 1; //@go_tags(`json:"licenses"`) //license列表
}
message ApiBatchResetLicenseStatusResp{
int32 success_count = 1; //@go_tags(`json:"success_count"`) //成功数量
int32 fail_count = 2; //@go_tags(`json:"fail_count"`) //失败数量
}
//全局第三方服务配置管理(按区域,AI/翻译等)----------------------------------------------
message ApiGetGlobalConfigReq {
Region region = 1;
}
message ApiGetGlobalConfigResp {
repeated DBGlobalConfigItem config = 1;
}
message ApiAddGlobalConfigsReq {
repeated DBGlobalConfigItem configs = 1;
}
message ApiAddGlobalConfigsResp {
}
message ApiUpdateGlobalConfigReq {
DBGlobalConfigItem config = 1;
}
message ApiUpdateGlobalConfigResp {
}
message ApiDelGlobalConfigsReq {
repeated uint64 ids = 1;
}
message ApiDelGlobalConfigsResp {
}
// 查询App综合统计
message ApiGetAppStatsReq {
int32 stat_type = 1; // 1=日统计 2=月统计 3=年统计
string start_date = 2; // 起始日期 日:2006-01-01 月:2006-01 年:2006
string end_date = 3; // 结束日期
}
message ApiGetAppStatsResp {
repeated DBAppStat stats = 1;
}
// 查询全局累计统计(单行,生命周期累计)
message ApiGetGlobalStatsReq {
}
message ApiGetGlobalStatsResp {
DBAppStat stat = 1; //@go_tags(`json:"stat"`) 累计统计(字段含义与 DBAppStat 一致)
int64 total_user_count = 2; //@go_tags(`json:"total_user_count"`) 累计注册人数(实时 COUNT(*) 用户表)
int64 total_pay_user_count = 3; //@go_tags(`json:"total_pay_user_count"`) 累计充值人数(实时 COUNT DISTINCT 付费订单)
}
// 重建统计数据(仅超管) —— 清空 app_stat_daily/monthly/yearly/global 后从源表全量重算
// 可重建字段:支付(payorder)/新增用户(user.createtime)/资源发放(useruselog.ts);
// 不可重建字段(无历史时间戳):login_count/active_user_count/active_device_count/ai/trade/meet 消耗次数 → 仅 global 行从 userstatistics 汇总,日/月/年留 0。
message ApiRebuildStatsReq {
}
message ApiRebuildStatsResp {
int32 daily_rows = 1; //@go_tags(`json:"daily_rows"`) 写入的日行数
int32 monthly_rows = 2; //@go_tags(`json:"monthly_rows"`) 写入的月行数
int32 yearly_rows = 3; //@go_tags(`json:"yearly_rows"`) 写入的年行数
int64 cost_ms = 4; //@go_tags(`json:"cost_ms"`) 耗时(毫秒)
}
// 用户使用量排行查询
message ApiGetUserRankReq {
string type = 1; //@go_tags(`json:"type"`) 排行类型 trade=翻译 meet=会议
int32 limit = 2; //@go_tags(`json:"limit"`) 返回条数 默认 10
uint32 product_id = 3; //@go_tags(`json:"product_id"`) 产品ID 0=代理全部产品(仅代理仪表盘"我的"标记会按此过滤)
}
// 单个排行项
message UserRankItem {
string uid = 1; //@go_tags(`json:"uid"`) 用户ID
string nickname = 2; //@go_tags(`json:"nickname"`) 昵称
string avatar = 3; //@go_tags(`json:"avatar"`) 头像
int64 trade_time = 4; //@go_tags(`json:"trade_time"`) 翻译时长(秒) 4个模式累加
int64 trade_count = 5; //@go_tags(`json:"trade_count"`) 翻译次数 4个模式累加
int64 meet_time = 6; //@go_tags(`json:"meet_time"`) 会议时长(秒)
int64 meet_count = 7; //@go_tags(`json:"meet_count"`) 会议次数
bool is_agent_user = 8; //@go_tags(`json:"is_agent_user"`) 是否当前代理名下用户(仅代理仪表盘场景置位)
string country_code = 9; //@go_tags(`json:"country_code"`) 所在国家编码
}
message ApiGetUserRankResp {
repeated UserRankItem list = 1; //@go_tags(`json:"list"`) 排行列表
}
// 添加管理员账号
message ApiAddAdminUserReq {
string account = 1; // 账号
string password = 2; // 密码(明文,服务端加密存储)
Identity identity = 3; // 身份
string access = 4; // 权限列表,逗号分隔
string factoryids = 5; // 关联工厂ID列表,逗号分隔(运营/代理使用)
string productids = 6; // 关联产品ID列表,逗号分隔(运营/代理使用)
}
message ApiAddAdminUserResp {
}
// 删除管理员账号
message ApiDelAdminUserReq {
string account = 1;
}
message ApiDelAdminUserResp {
}
// 修改管理员账号
message ApiUpdateAdminUserReq {
string account = 1;
string password = 2; // 为空则不修改
Identity identity = 3;
string access = 4;
string factoryids = 5; // 关联工厂ID列表,逗号分隔(运营/代理使用)
string productids = 6; // 关联产品ID列表,逗号分隔(运营/代理使用)
}
message ApiUpdateAdminUserResp {
}
// 查询管理员账号列表
message ApiGetAdminUsersReq {
}
message ApiGetAdminUsersResp {
repeated DBAdminUser users = 1;
}
// 获取COS临时上传凭证
message ApiGetCosTokenReq {
}
message ApiGetCosTokenResp {
string bucket = 1; // Bucket名称
string region = 2; // 区域
string bucket_url = 3; // BucketURL
string tmp_secret_id = 4; // 临时SecretId
string tmp_secret_key = 5; // 临时SecretKey
string session_token = 6; // SessionToken
string expiration = 7; // 过期时间
string domain = 8; // 自定义域名(可选)
}
// 翻译接口
message ApiTranslateReq {
string from = 1; // 源语言 如 zh
string to = 2; // 目标语言 如 en
repeated string texts = 3; // 待翻译文本列表
}
message ApiTranslateResp {
repeated string results = 1; // 翻译结果列表
}
// 操作日志查询
message ApiGetConsoleLogsReq {
string account = 1; // 筛选操作人(代理/管理员自动填自己)
string api_name = 2; // 筛选接口名称
int32 code = 3; // 筛选状态码 -1=全部 0=成功 >0=失败
int32 limit = 4; // 数量限制 默认200
}
message ApiGetConsoleLogsResp {
repeated DBConsoleLog logs = 1;
}
// 操作日志筛选项(下拉列表数据)
message ApiGetConsoleLogFiltersReq {
}
message ApiGetConsoleLogFiltersResp {
repeated string accounts = 1; // 去重的操作人列表
repeated string api_names = 2; // 去重的接口名称列表
}
// 生产批次查询(生产授权码批次台账统计)
message ApiGetProductionBatchesReq {
uint32 brandid = 1; // 品牌商ID 0=不限
uint32 productid = 2; // 产品ID 0=不限
int64 start = 3; // 起始时间(unix秒) 0=不限
int64 end = 4; // 结束时间(unix秒) 0=不限
int32 limit = 5; // 数量限制 默认500
}
message ApiGetProductionBatchesResp {
repeated DBProductionBatch notes = 1; // 批次明细
int64 total_batch = 2; // 命中批次数
int64 total_devices = 3; // 命中总设备数
}
// 运行日志 - 服务列表
message ApiListRuntimeLogsReq {
}
message ApiListRuntimeLogsResp {
repeated string services = 1; // 可选服务列表(home/api/gateway/mcp/timer/ai 等)
}
// 运行日志 - 查询
message ApiGetRuntimeLogReq {
string service = 1; // 服务名(对应 bin/log/<service>.log)
int64 before = 2; // 读取此字节偏移之前的内容;0 表示从文件末尾
int32 limit = 3; // 返回行数上限 默认500 最大2000
string keyword = 4; // 可选关键字过滤(子串匹配,区分大小写)
}
message ApiGetRuntimeLogResp {
repeated string lines = 1; // 日志行,旧 → 新 顺序
int64 earliest = 2; // 本次返回内容的起始字节位置(用于"加载更早"继续传给 before)
int64 file_size = 3; // 当前文件总字节数
bool has_more = 4; // earliest > 0 即还有更早的内容可加载
}
// 代理仪表盘统计
message ApiGetAgentDashboardReq {
uint32 product_id = 1; //@go_tags(`json:"product_id"`) 产品ID 0=代理全部产品汇总
}
message ApiGetAgentDashboardResp {
int64 batch_count = 1; //@go_tags(`json:"batch_count"`) 累计生产批次
int64 device_count = 2; //@go_tags(`json:"device_count"`) 累计生产设备码数量
int64 activated_count = 3; //@go_tags(`json:"activated_count"`) 已激活设备码数量(status=1)
int64 bound_user_count = 4; //@go_tags(`json:"bound_user_count"`) 绑定用户数量(distinct uid)
int64 pay_order_count = 5; //@go_tags(`json:"pay_order_count"`) 充值订单数量
int64 pay_total_amount = 6; //@go_tags(`json:"pay_total_amount"`) 累计充值金额(分)
int64 trade_time = 7; //@go_tags(`json:"trade_time"`) 名下用户累计翻译时长(秒)
int64 trade_count = 8; //@go_tags(`json:"trade_count"`) 名下用户累计翻译次数
int64 meet_time = 9; //@go_tags(`json:"meet_time"`) 名下用户累计会议时长(秒)
int64 meet_count = 10; //@go_tags(`json:"meet_count"`) 名下用户累计会议次数
// 资源点池(用于代理在仪表盘查看自己的"可赠送余量")
int64 vipday_balance = 11; //@go_tags(`json:"vipday_balance"`) VIP天数余额
int64 aichatintegral_balance = 12; //@go_tags(`json:"aichatintegral_balance"`) AI资源点余额
int64 tradesecond_balance = 13; //@go_tags(`json:"tradesecond_balance"`) 翻译秒数余额
int64 meetsecond_balance = 14; //@go_tags(`json:"meetsecond_balance"`) 会议秒数余额
// 资源点池累计接收 & 累计派发
int64 total_received_vipday = 15; //@go_tags(`json:"total_received_vipday"`)
int64 total_received_aichatintegral = 16; //@go_tags(`json:"total_received_aichatintegral"`)
int64 total_received_tradesecond = 17; //@go_tags(`json:"total_received_tradesecond"`)
int64 total_received_meetsecond = 18; //@go_tags(`json:"total_received_meetsecond"`)
int64 total_dispatched_vipday = 19; //@go_tags(`json:"total_dispatched_vipday"`)
int64 total_dispatched_aichatintegral = 20; //@go_tags(`json:"total_dispatched_aichatintegral"`)
int64 total_dispatched_tradesecond = 21; //@go_tags(`json:"total_dispatched_tradesecond"`)
int64 total_dispatched_meetsecond = 22; //@go_tags(`json:"total_dispatched_meetsecond"`)
// 代理可选切换的产品列表(前端下拉用,0=全部)
repeated AgentProductItem products = 30; //@go_tags(`json:"products"`) 当前代理可见的产品
}
// 代理仪表盘 - 产品下拉项
message AgentProductItem {
uint32 id = 1; //@go_tags(`json:"id"`)
string devicename = 2; //@go_tags(`json:"devicename"`)
uint32 brandid = 3; //@go_tags(`json:"brandid"`)
}
// 查询当前登录账号的资源点池(用于派发界面显示余额)
message ApiGetMyAdminPoolReq {}
message ApiGetMyAdminPoolResp {
Identity identity = 1; //@go_tags(`json:"identity"`) 当前账号身份(超管=1 不受限)
int64 vipday_balance = 2; //@go_tags(`json:"vipday_balance"`)
int64 aichatintegral_balance = 3; //@go_tags(`json:"aichatintegral_balance"`)
int64 tradesecond_balance = 4; //@go_tags(`json:"tradesecond_balance"`)
int64 meetsecond_balance = 5; //@go_tags(`json:"meetsecond_balance"`)
}
// 超管→后台账号 赠送资源点
message ApiGrantAdminResourceReq {
string account = 1; //@go_tags(`json:"account"`) 接收人账号
int64 vipday = 2; //@go_tags(`json:"vipday"`) VIP天数
int64 aichatintegral = 3; //@go_tags(`json:"aichatintegral"`) AI资源点
int64 tradesecond = 4; //@go_tags(`json:"tradesecond"`) 翻译秒数
int64 meetsecond = 5; //@go_tags(`json:"meetsecond"`) 会议秒数
string remark = 6; //@go_tags(`json:"remark"`) 备注
}
message ApiGrantAdminResourceResp {
DBAdminUser user = 1; //@go_tags(`json:"user"`) 更新后的账号(含余额)
}
// 后台账号资源流水(admin→admin)查询
message ApiGetAdminResourceLogsReq {
string account = 1; //@go_tags(`json:"account"`) 账号筛选(来源或接收)空=不限(仅超管可不限)
int32 page = 2; //@go_tags(`json:"page"`) 页码 从1开始 默认1
int32 size = 3; //@go_tags(`json:"size"`) 每页数量 默认20
}
message ApiGetAdminResourceLogsResp {
repeated DBAdminResourceLog logs = 1; //@go_tags(`json:"logs"`) 流水列表
int64 total = 2; //@go_tags(`json:"total"`) 总记录数
}
// 用户资源流水分页查询(赠送/绑定/充值/消耗)
message ApiGetUserUseLogsPagedReq {
string uid = 1; //@go_tags(`json:"uid"`) 用户uid 空=不限(仅超管/管理员)
UserLogType logtype = 2; //@go_tags(`json:"logtype"`) 类型 0=不限
int32 page = 3; //@go_tags(`json:"page"`) 页码 从1开始 默认1
int32 size = 4; //@go_tags(`json:"size"`) 每页数量 默认10
}
message ApiGetUserUseLogsPagedResp {
repeated DBUserUseLog logs = 1; //@go_tags(`json:"logs"`) 流水列表
int64 total = 2; //@go_tags(`json:"total"`) 总记录数
}