v1.1
This commit is contained in:
@@ -59,7 +59,6 @@ service main {
|
||||
// 代理实名认证审核(已废弃:实名认证改为三要素核验,无需审核)
|
||||
// @handler AdminAuditRealName
|
||||
// post /real_name/audit (AdminAuditRealNameReq) returns (AdminAuditRealNameResp)
|
||||
|
||||
// 系统配置查询
|
||||
@handler AdminGetAgentConfig
|
||||
get /config returns (AdminGetAgentConfigResp)
|
||||
@@ -93,17 +92,18 @@ type (
|
||||
Mobile *string `form:"mobile,optional"` // 手机号(可选)
|
||||
Region *string `form:"region,optional"` // 区域(可选)
|
||||
Level *int64 `form:"level,optional"` // 等级(可选)
|
||||
TeamLeaderId *int64 `form:"team_leader_id,optional"` // 团队首领ID(可选)
|
||||
TeamLeaderId *string `form:"team_leader_id,optional"` // 团队首领ID(可选)
|
||||
}
|
||||
AgentListItem {
|
||||
Id int64 `json:"id"` // 主键
|
||||
UserId int64 `json:"user_id"` // 用户ID
|
||||
Id string `json:"id"` // 主键
|
||||
UserId string `json:"user_id"` // 用户ID
|
||||
Level int64 `json:"level"` // 等级:1=普通,2=黄金,3=钻石
|
||||
LevelName string `json:"level_name"` // 等级名称
|
||||
Region string `json:"region"` // 区域
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
WechatId string `json:"wechat_id"` // 微信号
|
||||
TeamLeaderId int64 `json:"team_leader_id"` // 团队首领ID
|
||||
TeamLeaderId string `json:"team_leader_id"` // 团队首领ID
|
||||
AgentCode int64 `json:"agent_code"`
|
||||
Balance float64 `json:"balance"` // 钱包余额
|
||||
TotalEarnings float64 `json:"total_earnings"` // 累计收益
|
||||
FrozenBalance float64 `json:"frozen_balance"` // 冻结余额
|
||||
@@ -128,14 +128,14 @@ type (
|
||||
AdminGetAgentLinkListReq {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
AgentId *int64 `form:"agent_id,optional"` // 代理ID(可选)
|
||||
ProductId *int64 `form:"product_id,optional"` // 产品ID(可选)
|
||||
AgentId *string `form:"agent_id,optional"` // 代理ID(可选)
|
||||
ProductId *string `form:"product_id,optional"` // 产品ID(可选)
|
||||
LinkIdentifier *string `form:"link_identifier,optional"` // 推广码(可选)
|
||||
}
|
||||
AgentLinkListItem {
|
||||
Id int64 `json:"id"` // 主键
|
||||
AgentId int64 `json:"agent_id"` // 代理ID
|
||||
ProductId int64 `json:"product_id"` // 产品ID
|
||||
Id string `json:"id"` // 主键
|
||||
AgentId string `json:"agent_id"` // 代理ID
|
||||
ProductId string `json:"product_id"` // 产品ID
|
||||
ProductName string `json:"product_name"` // 产品名称
|
||||
SetPrice float64 `json:"set_price"` // 设定价格
|
||||
ActualBasePrice float64 `json:"actual_base_price"` // 实际底价
|
||||
@@ -148,17 +148,17 @@ type (
|
||||
}
|
||||
// 代理订单分页查询
|
||||
AdminGetAgentOrderListReq {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
AgentId *int64 `form:"agent_id,optional"` // 代理ID(可选)
|
||||
OrderId *int64 `form:"order_id,optional"` // 订单ID(可选)
|
||||
ProcessStatus *int64 `form:"process_status,optional"` // 处理状态(可选)
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
AgentId *string `form:"agent_id,optional"` // 代理ID(可选)
|
||||
OrderId *string `form:"order_id,optional"` // 订单ID(可选)
|
||||
ProcessStatus *int64 `form:"process_status,optional"` // 处理状态(可选)
|
||||
}
|
||||
AgentOrderListItem {
|
||||
Id int64 `json:"id"` // 主键
|
||||
AgentId int64 `json:"agent_id"` // 代理ID
|
||||
OrderId int64 `json:"order_id"` // 订单ID
|
||||
ProductId int64 `json:"product_id"` // 产品ID
|
||||
Id string `json:"id"` // 主键
|
||||
AgentId string `json:"agent_id"` // 代理ID
|
||||
OrderId string `json:"order_id"` // 订单ID
|
||||
ProductId string `json:"product_id"` // 产品ID
|
||||
ProductName string `json:"product_name"` // 产品名称
|
||||
OrderAmount float64 `json:"order_amount"` // 订单金额
|
||||
SetPrice float64 `json:"set_price"` // 设定价格
|
||||
@@ -174,16 +174,16 @@ type (
|
||||
}
|
||||
// 代理佣金分页查询
|
||||
AdminGetAgentCommissionListReq {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
AgentId *int64 `form:"agent_id,optional"` // 代理ID(可选)
|
||||
OrderId *int64 `form:"order_id,optional"` // 订单ID(可选)
|
||||
Status *int64 `form:"status,optional"` // 状态(可选)
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
AgentId *string `form:"agent_id,optional"` // 代理ID(可选)
|
||||
OrderId *string `form:"order_id,optional"` // 订单ID(可选)
|
||||
Status *int64 `form:"status,optional"` // 状态(可选)
|
||||
}
|
||||
AgentCommissionListItem {
|
||||
Id int64 `json:"id"` // 主键
|
||||
AgentId int64 `json:"agent_id"` // 代理ID
|
||||
OrderId int64 `json:"order_id"` // 订单ID
|
||||
Id string `json:"id"` // 主键
|
||||
AgentId string `json:"agent_id"` // 代理ID
|
||||
OrderId string `json:"order_id"` // 订单ID
|
||||
ProductName string `json:"product_name"` // 产品名称
|
||||
Amount float64 `json:"amount"` // 金额
|
||||
Status int64 `json:"status"` // 状态
|
||||
@@ -195,17 +195,17 @@ type (
|
||||
}
|
||||
// 代理返佣分页查询
|
||||
AdminGetAgentRebateListReq {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
AgentId *int64 `form:"agent_id,optional"` // 代理ID(可选)
|
||||
SourceAgentId *int64 `form:"source_agent_id,optional"` // 来源代理ID(可选)
|
||||
RebateType *int64 `form:"rebate_type,optional"` // 返佣类型(可选)
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
AgentId *string `form:"agent_id,optional"` // 代理ID(可选)
|
||||
SourceAgentId *string `form:"source_agent_id,optional"` // 来源代理ID(可选)
|
||||
RebateType *int64 `form:"rebate_type,optional"` // 返佣类型(可选)
|
||||
}
|
||||
AgentRebateListItem {
|
||||
Id int64 `json:"id"` // 主键
|
||||
AgentId int64 `json:"agent_id"` // 获得返佣的代理ID
|
||||
SourceAgentId int64 `json:"source_agent_id"` // 来源代理ID
|
||||
OrderId int64 `json:"order_id"` // 订单ID
|
||||
Id string `json:"id"` // 主键
|
||||
AgentId string `json:"agent_id"` // 获得返佣的代理ID
|
||||
SourceAgentId string `json:"source_agent_id"` // 来源代理ID
|
||||
OrderId string `json:"order_id"` // 订单ID
|
||||
RebateType int64 `json:"rebate_type"` // 返佣类型
|
||||
Amount float64 `json:"amount"` // 金额
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
@@ -216,15 +216,15 @@ type (
|
||||
}
|
||||
// 代理升级记录分页查询
|
||||
AdminGetAgentUpgradeListReq {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
AgentId *int64 `form:"agent_id,optional"` // 代理ID(可选)
|
||||
UpgradeType *int64 `form:"upgrade_type,optional"` // 升级类型(可选)
|
||||
Status *int64 `form:"status,optional"` // 状态(可选)
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
AgentId *string `form:"agent_id,optional"` // 代理ID(可选)
|
||||
UpgradeType *int64 `form:"upgrade_type,optional"` // 升级类型(可选)
|
||||
Status *int64 `form:"status,optional"` // 状态(可选)
|
||||
}
|
||||
AgentUpgradeListItem {
|
||||
Id int64 `json:"id"` // 主键
|
||||
AgentId int64 `json:"agent_id"` // 代理ID
|
||||
Id string `json:"id"` // 主键
|
||||
AgentId string `json:"agent_id"` // 代理ID
|
||||
FromLevel int64 `json:"from_level"` // 原等级
|
||||
ToLevel int64 `json:"to_level"` // 目标等级
|
||||
UpgradeType int64 `json:"upgrade_type"` // 升级类型
|
||||
@@ -241,13 +241,13 @@ type (
|
||||
AdminGetAgentWithdrawalListReq {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
AgentId *int64 `form:"agent_id,optional"` // 代理ID(可选)
|
||||
AgentId *string `form:"agent_id,optional"` // 代理ID(可选)
|
||||
Status *int64 `form:"status,optional"` // 状态(可选)
|
||||
WithdrawNo *string `form:"withdraw_no,optional"` // 提现单号(可选)
|
||||
}
|
||||
AgentWithdrawalListItem {
|
||||
Id int64 `json:"id"` // 主键
|
||||
AgentId int64 `json:"agent_id"` // 代理ID
|
||||
Id string `json:"id"` // 主键
|
||||
AgentId string `json:"agent_id"` // 代理ID
|
||||
WithdrawNo string `json:"withdraw_no"` // 提现单号
|
||||
Amount float64 `json:"amount"` // 金额
|
||||
TaxAmount float64 `json:"tax_amount"` // 税费金额
|
||||
@@ -264,7 +264,7 @@ type (
|
||||
}
|
||||
// 代理提现审核
|
||||
AdminAuditWithdrawalReq {
|
||||
WithdrawalId int64 `json:"withdrawal_id"` // 提现记录ID
|
||||
WithdrawalId string `json:"withdrawal_id"` // 提现记录ID
|
||||
Status int64 `json:"status"` // 审核状态:2=通过,3=拒绝
|
||||
Remark string `json:"remark"` // 备注
|
||||
}
|
||||
@@ -273,20 +273,20 @@ type (
|
||||
}
|
||||
// 代理实名认证分页查询
|
||||
AdminGetAgentRealNameListReq {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
AgentId *int64 `form:"agent_id,optional"` // 代理ID(可选)
|
||||
Status *int64 `form:"status,optional"` // 状态(可选):1=未验证,2=已通过
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
AgentId *string `form:"agent_id,optional"` // 代理ID(可选)
|
||||
Status *int64 `form:"status,optional"` // 状态(可选):1=未验证,2=已通过
|
||||
}
|
||||
AgentRealNameListItem {
|
||||
Id int64 `json:"id"` // 主键
|
||||
AgentId int64 `json:"agent_id"` // 代理ID
|
||||
Name string `json:"name"` // 姓名
|
||||
IdCard string `json:"id_card"` // 身份证号
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
Status int64 `json:"status"` // 状态:1=未验证,2=已通过(verify_time不为空表示已通过)
|
||||
VerifyTime string `json:"verify_time"` // 验证时间(三要素核验通过时间)
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
Id string `json:"id"` // 主键
|
||||
AgentId string `json:"agent_id"` // 代理ID
|
||||
Name string `json:"name"` // 姓名
|
||||
IdCard string `json:"id_card"` // 身份证号
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
Status int64 `json:"status"` // 状态:1=未验证,2=已通过(verify_time不为空表示已通过)
|
||||
VerifyTime string `json:"verify_time"` // 验证时间(三要素核验通过时间)
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
}
|
||||
AdminGetAgentRealNameListResp {
|
||||
Total int64 `json:"total"` // 总数
|
||||
@@ -303,14 +303,16 @@ type (
|
||||
}
|
||||
// 系统配置查询(价格配置已移除,改为产品配置表管理)
|
||||
AdminGetAgentConfigResp {
|
||||
LevelBonus LevelBonusConfig `json:"level_bonus"` // 等级加成配置
|
||||
UpgradeFee UpgradeFeeConfig `json:"upgrade_fee"` // 升级费用配置
|
||||
UpgradeRebate UpgradeRebateConfig `json:"upgrade_rebate"` // 升级返佣配置
|
||||
DirectParentRebate DirectParentRebateConfig `json:"direct_parent_rebate"` // 直接上级返佣配置
|
||||
MaxGoldRebateAmount float64 `json:"max_gold_rebate_amount"` // 黄金代理最大返佣金额
|
||||
CommissionFreeze CommissionFreezeConfig `json:"commission_freeze"` // 佣金冻结配置
|
||||
TaxRate float64 `json:"tax_rate"` // 税率
|
||||
TaxExemptionAmount float64 `json:"tax_exemption_amount"` // 免税额度
|
||||
LevelBonus LevelBonusConfig `json:"level_bonus"` // 等级加成配置
|
||||
UpgradeFee UpgradeFeeConfig `json:"upgrade_fee"` // 升级费用配置
|
||||
UpgradeRebate UpgradeRebateConfig `json:"upgrade_rebate"` // 升级返佣配置
|
||||
DirectParentRebate DirectParentRebateConfig `json:"direct_parent_rebate"` // 直接上级返佣配置
|
||||
MaxGoldRebateAmount float64 `json:"max_gold_rebate_amount"` // 黄金代理最大返佣金额
|
||||
CommissionFreeze CommissionFreezeConfig `json:"commission_freeze"` // 佣金冻结配置
|
||||
TaxRate float64 `json:"tax_rate"` // 税率
|
||||
TaxExemptionAmount float64 `json:"tax_exemption_amount"` // 免税额度
|
||||
GoldMaxUpliftAmount float64 `json:"gold_max_uplift_amount"`
|
||||
DiamondMaxUpliftAmount float64 `json:"diamond_max_uplift_amount"`
|
||||
}
|
||||
LevelBonusConfig {
|
||||
Diamond int64 `json:"diamond"` // 钻石加成:0
|
||||
@@ -320,7 +322,6 @@ type (
|
||||
UpgradeFeeConfig {
|
||||
NormalToGold float64 `json:"normal_to_gold"` // 普通→黄金:199
|
||||
NormalToDiamond float64 `json:"normal_to_diamond"` // 普通→钻石:980
|
||||
GoldToDiamond float64 `json:"gold_to_diamond"` // 黄金→钻石:980
|
||||
}
|
||||
UpgradeRebateConfig {
|
||||
NormalToGoldRebate float64 `json:"normal_to_gold_rebate"` // 普通→黄金返佣:139
|
||||
@@ -332,34 +333,36 @@ type (
|
||||
Normal float64 `json:"normal"` // 直接上级是普通的返佣金额(2元)
|
||||
}
|
||||
CommissionFreezeConfig {
|
||||
Ratio float64 `json:"ratio"` // 佣金冻结比例(例如:0.1表示10%)
|
||||
Threshold float64 `json:"threshold"` // 佣金冻结阈值(订单单价达到此金额才触发冻结,单位:元)
|
||||
Days int64 `json:"days"` // 佣金冻结解冻天数(单位:天,例如:30表示30天后解冻)
|
||||
Ratio float64 `json:"ratio"` // 佣金冻结比例(例如:0.1表示10%)
|
||||
Threshold float64 `json:"threshold"` // 佣金冻结阈值(订单单价达到此金额才触发冻结,单位:元)
|
||||
Days int64 `json:"days"` // 佣金冻结解冻天数(单位:天,例如:30表示30天后解冻)
|
||||
}
|
||||
// 系统配置更新(价格配置已移除,改为产品配置表管理)
|
||||
AdminUpdateAgentConfigReq {
|
||||
LevelBonus *LevelBonusConfig `json:"level_bonus,optional"` // 等级加成配置
|
||||
UpgradeFee *UpgradeFeeConfig `json:"upgrade_fee,optional"` // 升级费用配置
|
||||
UpgradeRebate *UpgradeRebateConfig `json:"upgrade_rebate,optional"` // 升级返佣配置
|
||||
DirectParentRebate *DirectParentRebateConfig `json:"direct_parent_rebate,optional"` // 直接上级返佣配置
|
||||
MaxGoldRebateAmount *float64 `json:"max_gold_rebate_amount,optional"` // 黄金代理最大返佣金额
|
||||
CommissionFreeze *CommissionFreezeConfig `json:"commission_freeze,optional"` // 佣金冻结配置
|
||||
TaxRate *float64 `json:"tax_rate,optional"` // 税率
|
||||
TaxExemptionAmount *float64 `json:"tax_exemption_amount,optional"` // 免税额度
|
||||
LevelBonus *LevelBonusConfig `json:"level_bonus,optional"` // 等级加成配置
|
||||
UpgradeFee *UpgradeFeeConfig `json:"upgrade_fee,optional"` // 升级费用配置
|
||||
UpgradeRebate *UpgradeRebateConfig `json:"upgrade_rebate,optional"` // 升级返佣配置
|
||||
DirectParentRebate *DirectParentRebateConfig `json:"direct_parent_rebate,optional"` // 直接上级返佣配置
|
||||
MaxGoldRebateAmount *float64 `json:"max_gold_rebate_amount,optional"` // 黄金代理最大返佣金额
|
||||
CommissionFreeze *CommissionFreezeConfig `json:"commission_freeze,optional"` // 佣金冻结配置
|
||||
TaxRate *float64 `json:"tax_rate,optional"` // 税率
|
||||
TaxExemptionAmount *float64 `json:"tax_exemption_amount,optional"` // 免税额度
|
||||
GoldMaxUpliftAmount *float64 `json:"gold_max_uplift_amount,optional"`
|
||||
DiamondMaxUpliftAmount *float64 `json:"diamond_max_uplift_amount,optional"`
|
||||
}
|
||||
AdminUpdateAgentConfigResp {
|
||||
Success bool `json:"success"`
|
||||
}
|
||||
// 产品配置分页查询
|
||||
AdminGetAgentProductConfigListReq {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
ProductId *int64 `form:"product_id,optional"` // 产品ID(可选)
|
||||
ProductName *string `form:"product_name,optional"` // 产品名称(可选,用于搜索)
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
ProductId *string `form:"product_id,optional"` // 产品ID(可选)
|
||||
ProductName *string `form:"product_name,optional"` // 产品名称(可选,用于搜索)
|
||||
}
|
||||
AgentProductConfigItem {
|
||||
Id int64 `json:"id"` // 主键
|
||||
ProductId int64 `json:"product_id"` // 产品ID
|
||||
Id string `json:"id"` // 主键
|
||||
ProductId string `json:"product_id"` // 产品ID
|
||||
ProductName string `json:"product_name"` // 产品名称
|
||||
BasePrice float64 `json:"base_price"` // 基础底价
|
||||
PriceRangeMin float64 `json:"price_range_min"` // 最低定价
|
||||
@@ -374,11 +377,11 @@ type (
|
||||
}
|
||||
// 产品配置更新
|
||||
AdminUpdateAgentProductConfigReq {
|
||||
Id int64 `json:"id"` // 主键
|
||||
BasePrice float64 `json:"base_price"` // 基础底价
|
||||
PriceRangeMax float64 `json:"price_range_max"` // 最高定价(对应数据库 system_max_price)
|
||||
PriceThreshold *float64 `json:"price_threshold,optional"` // 提价标准阈值(可选)
|
||||
PriceFeeRate *float64 `json:"price_fee_rate,optional"` // 提价手续费比例(可选)
|
||||
Id string `json:"id"` // 主键
|
||||
BasePrice float64 `json:"base_price"` // 基础底价
|
||||
PriceRangeMax float64 `json:"price_range_max"` // 最高定价(对应数据库 system_max_price)
|
||||
PriceThreshold *float64 `json:"price_threshold,optional"` // 提价标准阈值(可选)
|
||||
PriceFeeRate *float64 `json:"price_fee_rate,optional"` // 提价手续费比例(可选)
|
||||
}
|
||||
AdminUpdateAgentProductConfigResp {
|
||||
Success bool `json:"success"`
|
||||
@@ -397,19 +400,19 @@ type (
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"pageSize"` // 每页数量
|
||||
Code *string `form:"code,optional"` // 邀请码(可选)
|
||||
AgentId *int64 `form:"agent_id,optional"` // 发放代理ID(可选,NULL表示平台发放)
|
||||
AgentId *string `form:"agent_id,optional"` // 发放代理ID(可选,NULL表示平台发放)
|
||||
TargetLevel *int64 `form:"target_level,optional"` // 目标等级(可选)
|
||||
Status *int64 `form:"status,optional"` // 状态(可选)
|
||||
}
|
||||
InviteCodeListItem {
|
||||
Id int64 `json:"id"` // 主键
|
||||
Id string `json:"id"` // 主键
|
||||
Code string `json:"code"` // 邀请码
|
||||
AgentId int64 `json:"agent_id"` // 发放代理ID(0表示平台发放)
|
||||
AgentId string `json:"agent_id"` // 发放代理ID(0表示平台发放)
|
||||
AgentMobile string `json:"agent_mobile"` // 发放代理手机号
|
||||
TargetLevel int64 `json:"target_level"` // 目标等级
|
||||
Status int64 `json:"status"` // 状态:0=未使用,1=已使用,2=已失效
|
||||
UsedUserId int64 `json:"used_user_id"` // 使用用户ID
|
||||
UsedAgentId int64 `json:"used_agent_id"` // 使用代理ID
|
||||
UsedUserId string `json:"used_user_id"` // 使用用户ID
|
||||
UsedAgentId string `json:"used_agent_id"` // 使用代理ID
|
||||
UsedTime string `json:"used_time"` // 使用时间
|
||||
ExpireTime string `json:"expire_time"` // 过期时间
|
||||
Remark string `json:"remark"` // 备注
|
||||
|
||||
@@ -25,7 +25,7 @@ type (
|
||||
|
||||
// API信息
|
||||
AdminApiInfo {
|
||||
Id int64 `json:"id"`
|
||||
Id string `json:"id"`
|
||||
ApiName string `json:"api_name"`
|
||||
ApiCode string `json:"api_code"`
|
||||
Method string `json:"method"`
|
||||
@@ -38,7 +38,7 @@ type (
|
||||
|
||||
// API详情请求
|
||||
AdminGetApiDetailReq {
|
||||
Id int64 `path:"id"`
|
||||
Id string `path:"id"`
|
||||
}
|
||||
|
||||
// API详情响应
|
||||
@@ -58,12 +58,12 @@ type (
|
||||
|
||||
// 创建API响应
|
||||
AdminCreateApiResp {
|
||||
Id int64 `json:"id"`
|
||||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
// 更新API请求
|
||||
AdminUpdateApiReq {
|
||||
Id int64 `path:"id"`
|
||||
Id string `path:"id"`
|
||||
ApiName string `json:"api_name"`
|
||||
ApiCode string `json:"api_code"`
|
||||
Method string `json:"method"`
|
||||
@@ -79,7 +79,7 @@ type (
|
||||
|
||||
// 删除API请求
|
||||
AdminDeleteApiReq {
|
||||
Id int64 `path:"id"`
|
||||
Id string `path:"id"`
|
||||
}
|
||||
|
||||
// 删除API响应
|
||||
@@ -89,7 +89,7 @@ type (
|
||||
|
||||
// 批量更新API状态请求
|
||||
AdminBatchUpdateApiStatusReq {
|
||||
Ids []int64 `json:"ids"`
|
||||
Ids []string `json:"ids"`
|
||||
Status int64 `json:"status"`
|
||||
}
|
||||
|
||||
|
||||
@@ -49,23 +49,23 @@ type (
|
||||
Name string `json:"name"` // 描述
|
||||
}
|
||||
// 创建功能响应
|
||||
AdminCreateFeatureResp {
|
||||
Id int64 `json:"id"` // 功能ID
|
||||
}
|
||||
AdminCreateFeatureResp {
|
||||
Id string `json:"id"` // 功能ID
|
||||
}
|
||||
// 更新功能请求
|
||||
AdminUpdateFeatureReq {
|
||||
Id int64 `path:"id"` // 功能ID
|
||||
ApiId *string `json:"api_id,optional"` // API标识
|
||||
Name *string `json:"name,optional"` // 描述
|
||||
}
|
||||
AdminUpdateFeatureReq {
|
||||
Id string `path:"id"` // 功能ID
|
||||
ApiId *string `json:"api_id,optional"` // API标识
|
||||
Name *string `json:"name,optional"` // 描述
|
||||
}
|
||||
// 更新功能响应
|
||||
AdminUpdateFeatureResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
// 删除功能请求
|
||||
AdminDeleteFeatureReq {
|
||||
Id int64 `path:"id"` // 功能ID
|
||||
}
|
||||
AdminDeleteFeatureReq {
|
||||
Id string `path:"id"` // 功能ID
|
||||
}
|
||||
// 删除功能响应
|
||||
AdminDeleteFeatureResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
@@ -78,9 +78,9 @@ type (
|
||||
Name *string `form:"name,optional"` // 描述
|
||||
}
|
||||
// 功能列表项
|
||||
FeatureListItem {
|
||||
Id int64 `json:"id"` // 功能ID
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
FeatureListItem {
|
||||
Id string `json:"id"` // 功能ID
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
Name string `json:"name"` // 描述
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
@@ -91,38 +91,38 @@ type (
|
||||
Items []FeatureListItem `json:"items"` // 列表数据
|
||||
}
|
||||
// 获取功能详情请求
|
||||
AdminGetFeatureDetailReq {
|
||||
Id int64 `path:"id"` // 功能ID
|
||||
}
|
||||
AdminGetFeatureDetailReq {
|
||||
Id string `path:"id"` // 功能ID
|
||||
}
|
||||
// 获取功能详情响应
|
||||
AdminGetFeatureDetailResp {
|
||||
Id int64 `json:"id"` // 功能ID
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
AdminGetFeatureDetailResp {
|
||||
Id string `json:"id"` // 功能ID
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
Name string `json:"name"` // 描述
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
// 配置功能示例数据请求
|
||||
AdminConfigFeatureExampleReq {
|
||||
FeatureId int64 `json:"feature_id"` // 功能ID
|
||||
Data string `json:"data"` // 示例数据JSON
|
||||
}
|
||||
AdminConfigFeatureExampleReq {
|
||||
FeatureId string `json:"feature_id"` // 功能ID
|
||||
Data string `json:"data"` // 示例数据JSON
|
||||
}
|
||||
// 配置功能示例数据响应
|
||||
AdminConfigFeatureExampleResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
// 查看功能示例数据请求
|
||||
AdminGetFeatureExampleReq {
|
||||
FeatureId int64 `path:"feature_id"` // 功能ID
|
||||
}
|
||||
AdminGetFeatureExampleReq {
|
||||
FeatureId string `path:"feature_id"` // 功能ID
|
||||
}
|
||||
// 查看功能示例数据响应
|
||||
AdminGetFeatureExampleResp {
|
||||
Id int64 `json:"id"` // 示例数据ID
|
||||
FeatureId int64 `json:"feature_id"` // 功能ID
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
Data string `json:"data"` // 示例数据JSON
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
AdminGetFeatureExampleResp {
|
||||
Id string `json:"id"` // 示例数据ID
|
||||
FeatureId string `json:"feature_id"` // 功能ID
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
Data string `json:"data"` // 示例数据JSON
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -54,14 +54,14 @@ type (
|
||||
}
|
||||
|
||||
// 创建产品响应
|
||||
AdminCreateProductResp {
|
||||
Id int64 `json:"id"` // 产品ID
|
||||
}
|
||||
AdminCreateProductResp {
|
||||
Id string `json:"id"` // 产品ID
|
||||
}
|
||||
|
||||
// 更新产品请求
|
||||
AdminUpdateProductReq {
|
||||
Id int64 `path:"id"` // 产品ID
|
||||
ProductName *string `json:"product_name,optional"` // 服务名
|
||||
AdminUpdateProductReq {
|
||||
Id string `path:"id"` // 产品ID
|
||||
ProductName *string `json:"product_name,optional"` // 服务名
|
||||
ProductEn *string `json:"product_en,optional"` // 英文名
|
||||
Description *string `json:"description,optional"` // 描述
|
||||
Notes *string `json:"notes,optional"` // 备注
|
||||
@@ -75,9 +75,9 @@ type (
|
||||
}
|
||||
|
||||
// 删除产品请求
|
||||
AdminDeleteProductReq {
|
||||
Id int64 `path:"id"` // 产品ID
|
||||
}
|
||||
AdminDeleteProductReq {
|
||||
Id string `path:"id"` // 产品ID
|
||||
}
|
||||
|
||||
// 删除产品响应
|
||||
AdminDeleteProductResp {
|
||||
@@ -93,9 +93,9 @@ type (
|
||||
}
|
||||
|
||||
// 产品列表项
|
||||
ProductListItem {
|
||||
Id int64 `json:"id"` // 产品ID
|
||||
ProductName string `json:"product_name"` // 服务名
|
||||
ProductListItem {
|
||||
Id string `json:"id"` // 产品ID
|
||||
ProductName string `json:"product_name"` // 服务名
|
||||
ProductEn string `json:"product_en"` // 英文名
|
||||
Description string `json:"description"` // 描述
|
||||
Notes string `json:"notes"` // 备注
|
||||
@@ -112,14 +112,14 @@ type (
|
||||
}
|
||||
|
||||
// 获取产品详情请求
|
||||
AdminGetProductDetailReq {
|
||||
Id int64 `path:"id"` // 产品ID
|
||||
}
|
||||
AdminGetProductDetailReq {
|
||||
Id string `path:"id"` // 产品ID
|
||||
}
|
||||
|
||||
// 获取产品详情响应
|
||||
AdminGetProductDetailResp {
|
||||
Id int64 `json:"id"` // 产品ID
|
||||
ProductName string `json:"product_name"` // 服务名
|
||||
AdminGetProductDetailResp {
|
||||
Id string `json:"id"` // 产品ID
|
||||
ProductName string `json:"product_name"` // 服务名
|
||||
ProductEn string `json:"product_en"` // 英文名
|
||||
Description string `json:"description"` // 描述
|
||||
Notes string `json:"notes"` // 备注
|
||||
@@ -130,23 +130,23 @@ type (
|
||||
}
|
||||
|
||||
// 获取产品功能列表请求
|
||||
AdminGetProductFeatureListReq {
|
||||
ProductId int64 `path:"product_id"` // 产品ID
|
||||
}
|
||||
AdminGetProductFeatureListReq {
|
||||
ProductId string `path:"product_id"` // 产品ID
|
||||
}
|
||||
|
||||
// 获取产品功能列表响应Item
|
||||
AdminGetProductFeatureListResp {
|
||||
Id int64 `json:"id"` // 关联ID
|
||||
ProductId int64 `json:"product_id"` // 产品ID
|
||||
FeatureId int64 `json:"feature_id"` // 功能ID
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
Name string `json:"name"` // 功能描述
|
||||
Sort int64 `json:"sort"` // 排序
|
||||
Enable int64 `json:"enable"` // 是否启用
|
||||
IsImportant int64 `json:"is_important"` // 是否重要
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
AdminGetProductFeatureListResp {
|
||||
Id string `json:"id"` // 关联ID
|
||||
ProductId string `json:"product_id"` // 产品ID
|
||||
FeatureId string `json:"feature_id"` // 功能ID
|
||||
ApiId string `json:"api_id"` // API标识
|
||||
Name string `json:"name"` // 功能描述
|
||||
Sort int64 `json:"sort"` // 排序
|
||||
Enable int64 `json:"enable"` // 是否启用
|
||||
IsImportant int64 `json:"is_important"` // 是否重要
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
|
||||
// // 获取产品功能列表响应
|
||||
// AdminGetProductFeatureListResp {
|
||||
@@ -154,21 +154,21 @@ type (
|
||||
// }
|
||||
|
||||
// 产品功能关联项
|
||||
ProductFeatureItem {
|
||||
FeatureId int64 `json:"feature_id"` // 功能ID
|
||||
Sort int64 `json:"sort"` // 排序
|
||||
Enable int64 `json:"enable"` // 是否启用
|
||||
IsImportant int64 `json:"is_important"` // 是否重要
|
||||
}
|
||||
ProductFeatureItem {
|
||||
FeatureId string `json:"feature_id"` // 功能ID
|
||||
Sort int64 `json:"sort"` // 排序
|
||||
Enable int64 `json:"enable"` // 是否启用
|
||||
IsImportant int64 `json:"is_important"` // 是否重要
|
||||
}
|
||||
|
||||
// 更新产品功能关联请求(批量)
|
||||
AdminUpdateProductFeaturesReq {
|
||||
ProductId int64 `path:"product_id"` // 产品ID
|
||||
Features []ProductFeatureItem `json:"features"` // 功能列表
|
||||
}
|
||||
AdminUpdateProductFeaturesReq {
|
||||
ProductId string `path:"product_id"` // 产品ID
|
||||
Features []ProductFeatureItem `json:"features"` // 功能列表
|
||||
}
|
||||
|
||||
// 更新产品功能关联响应
|
||||
AdminUpdateProductFeaturesResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
@@ -33,14 +33,14 @@ service main {
|
||||
put /cleanup/config (AdminUpdateQueryCleanupConfigReq) returns (AdminUpdateQueryCleanupConfigResp)
|
||||
}
|
||||
|
||||
type AdminGetQueryDetailByOrderIdReq {
|
||||
OrderId int64 `path:"order_id"`
|
||||
type AdminGetQueryDetailByOrderIdReq {
|
||||
OrderId string `path:"order_id"`
|
||||
}
|
||||
|
||||
type AdminGetQueryDetailByOrderIdResp {
|
||||
Id int64 `json:"id"` // 主键ID
|
||||
OrderId int64 `json:"order_id"` // 订单ID
|
||||
UserId int64 `json:"user_id"` // 用户ID
|
||||
type AdminGetQueryDetailByOrderIdResp {
|
||||
Id string `json:"id"` // 主键ID
|
||||
OrderId string `json:"order_id"` // 订单ID
|
||||
UserId string `json:"user_id"` // 用户ID
|
||||
ProductName string `json:"product_name"` // 产品ID
|
||||
QueryParams map[string]interface{} `json:"query_params"`
|
||||
QueryData []AdminQueryItem `json:"query_data"`
|
||||
@@ -68,8 +68,8 @@ type AdminGetQueryCleanupLogListResp {
|
||||
Items []QueryCleanupLogItem `json:"items"` // 列表
|
||||
}
|
||||
|
||||
type QueryCleanupLogItem {
|
||||
Id int64 `json:"id"` // 主键ID
|
||||
type QueryCleanupLogItem {
|
||||
Id string `json:"id"` // 主键ID
|
||||
CleanupTime string `json:"cleanup_time"` // 清理时间
|
||||
CleanupBefore string `json:"cleanup_before"` // 清理截止时间
|
||||
Status int64 `json:"status"` // 状态:1-成功,2-失败
|
||||
@@ -80,8 +80,8 @@ type QueryCleanupLogItem {
|
||||
}
|
||||
|
||||
// 清理详情相关请求响应定义
|
||||
type AdminGetQueryCleanupDetailListReq {
|
||||
LogId int64 `path:"log_id"` // 清理日志ID
|
||||
type AdminGetQueryCleanupDetailListReq {
|
||||
LogId string `path:"log_id"` // 清理日志ID
|
||||
Page int64 `form:"page,default=1"` // 页码
|
||||
PageSize int64 `form:"page_size,default=20"` // 每页数量
|
||||
}
|
||||
@@ -91,12 +91,12 @@ type AdminGetQueryCleanupDetailListResp {
|
||||
Items []QueryCleanupDetailItem `json:"items"` // 列表
|
||||
}
|
||||
|
||||
type QueryCleanupDetailItem {
|
||||
Id int64 `json:"id"` // 主键ID
|
||||
CleanupLogId int64 `json:"cleanup_log_id"` // 清理日志ID
|
||||
QueryId int64 `json:"query_id"` // 查询ID
|
||||
OrderId int64 `json:"order_id"` // 订单ID
|
||||
UserId int64 `json:"user_id"` // 用户ID
|
||||
type QueryCleanupDetailItem {
|
||||
Id string `json:"id"` // 主键ID
|
||||
CleanupLogId string `json:"cleanup_log_id"` // 清理日志ID
|
||||
QueryId string `json:"query_id"` // 查询ID
|
||||
OrderId string `json:"order_id"` // 订单ID
|
||||
UserId string `json:"user_id"` // 用户ID
|
||||
ProductName string `json:"product_name"` // 产品名称
|
||||
QueryState string `json:"query_state"` // 查询状态
|
||||
CreateTimeOld string `json:"create_time_old"` // 原创建时间
|
||||
@@ -112,8 +112,8 @@ type AdminGetQueryCleanupConfigListResp {
|
||||
Items []QueryCleanupConfigItem `json:"items"` // 配置列表
|
||||
}
|
||||
|
||||
type QueryCleanupConfigItem {
|
||||
Id int64 `json:"id"` // 主键ID
|
||||
type QueryCleanupConfigItem {
|
||||
Id string `json:"id"` // 主键ID
|
||||
ConfigKey string `json:"config_key"` // 配置键
|
||||
ConfigValue string `json:"config_value"` // 配置值
|
||||
ConfigDesc string `json:"config_desc"` // 配置描述
|
||||
@@ -122,12 +122,12 @@ type QueryCleanupConfigItem {
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
|
||||
type AdminUpdateQueryCleanupConfigReq {
|
||||
Id int64 `json:"id"` // 主键ID
|
||||
type AdminUpdateQueryCleanupConfigReq {
|
||||
Id string `json:"id"` // 主键ID
|
||||
ConfigValue string `json:"config_value"` // 配置值
|
||||
Status int64 `json:"status"` // 状态:1-启用,0-禁用
|
||||
}
|
||||
|
||||
type AdminUpdateQueryCleanupConfigResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ info(
|
||||
type (
|
||||
// 获取角色API权限列表请求
|
||||
AdminGetRoleApiListReq {
|
||||
RoleId int64 `path:"role_id"`
|
||||
RoleId string `path:"role_id"`
|
||||
}
|
||||
|
||||
// 获取角色API权限列表响应
|
||||
@@ -20,9 +20,9 @@ type (
|
||||
|
||||
// 角色API权限信息
|
||||
AdminRoleApiInfo {
|
||||
Id int64 `json:"id"`
|
||||
RoleId int64 `json:"role_id"`
|
||||
ApiId int64 `json:"api_id"`
|
||||
Id string `json:"id"`
|
||||
RoleId string `json:"role_id"`
|
||||
ApiId string `json:"api_id"`
|
||||
ApiName string `json:"api_name"`
|
||||
ApiCode string `json:"api_code"`
|
||||
Method string `json:"method"`
|
||||
@@ -33,8 +33,8 @@ type (
|
||||
|
||||
// 分配角色API权限请求
|
||||
AdminAssignRoleApiReq {
|
||||
RoleId int64 `json:"role_id"`
|
||||
ApiIds []int64 `json:"api_ids"`
|
||||
RoleId string `json:"role_id"`
|
||||
ApiIds []string `json:"api_ids"`
|
||||
}
|
||||
|
||||
// 分配角色API权限响应
|
||||
@@ -44,8 +44,8 @@ type (
|
||||
|
||||
// 移除角色API权限请求
|
||||
AdminRemoveRoleApiReq {
|
||||
RoleId int64 `json:"role_id"`
|
||||
ApiIds []int64 `json:"api_ids"`
|
||||
RoleId string `json:"role_id"`
|
||||
ApiIds []string `json:"api_ids"`
|
||||
}
|
||||
|
||||
// 移除角色API权限响应
|
||||
@@ -55,8 +55,8 @@ type (
|
||||
|
||||
// 更新角色API权限请求
|
||||
AdminUpdateRoleApiReq {
|
||||
RoleId int64 `json:"role_id"`
|
||||
ApiIds []int64 `json:"api_ids"`
|
||||
RoleId string `json:"role_id"`
|
||||
ApiIds []string `json:"api_ids"`
|
||||
}
|
||||
|
||||
// 更新角色API权限响应
|
||||
|
||||
@@ -58,52 +58,52 @@ type (
|
||||
}
|
||||
|
||||
// 列表项
|
||||
AdminUserListItem {
|
||||
Id int64 `json:"id"` // 用户ID
|
||||
Username string `json:"username"` // 用户名
|
||||
RealName string `json:"real_name"` // 真实姓名
|
||||
Status int64 `json:"status"` // 状态:0-禁用,1-启用
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
RoleIds []int64 `json:"role_ids"` // 关联的角色ID列表
|
||||
}
|
||||
AdminUserListItem {
|
||||
Id string `json:"id"` // 用户ID
|
||||
Username string `json:"username"` // 用户名
|
||||
RealName string `json:"real_name"` // 真实姓名
|
||||
Status int64 `json:"status"` // 状态:0-禁用,1-启用
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
RoleIds []string `json:"role_ids"` // 关联的角色ID列表
|
||||
}
|
||||
|
||||
// 详情请求
|
||||
AdminGetUserDetailReq {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
}
|
||||
AdminGetUserDetailReq {
|
||||
Id string `path:"id"` // 用户ID
|
||||
}
|
||||
|
||||
// 详情响应
|
||||
AdminGetUserDetailResp {
|
||||
Id int64 `json:"id"` // 用户ID
|
||||
Username string `json:"username"` // 用户名
|
||||
RealName string `json:"real_name"` // 真实姓名
|
||||
Status int64 `json:"status"` // 状态:0-禁用,1-启用
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
RoleIds []int64 `json:"role_ids"` // 关联的角色ID列表
|
||||
}
|
||||
AdminGetUserDetailResp {
|
||||
Id string `json:"id"` // 用户ID
|
||||
Username string `json:"username"` // 用户名
|
||||
RealName string `json:"real_name"` // 真实姓名
|
||||
Status int64 `json:"status"` // 状态:0-禁用,1-启用
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
RoleIds []string `json:"role_ids"` // 关联的角色ID列表
|
||||
}
|
||||
|
||||
// 创建请求
|
||||
AdminCreateUserReq {
|
||||
Username string `json:"username"` // 用户名
|
||||
RealName string `json:"real_name"` // 真实姓名
|
||||
Status int64 `json:"status,default=1"` // 状态:0-禁用,1-启用
|
||||
RoleIds []int64 `json:"role_ids"` // 关联的角色ID列表
|
||||
}
|
||||
AdminCreateUserReq {
|
||||
Username string `json:"username"` // 用户名
|
||||
RealName string `json:"real_name"` // 真实姓名
|
||||
Status int64 `json:"status,default=1"` // 状态:0-禁用,1-启用
|
||||
RoleIds []string `json:"role_ids"` // 关联的角色ID列表
|
||||
}
|
||||
|
||||
// 创建响应
|
||||
AdminCreateUserResp {
|
||||
Id int64 `json:"id"` // 用户ID
|
||||
}
|
||||
AdminCreateUserResp {
|
||||
Id string `json:"id"` // 用户ID
|
||||
}
|
||||
|
||||
// 更新请求
|
||||
AdminUpdateUserReq {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
Username *string `json:"username,optional"` // 用户名
|
||||
RealName *string `json:"real_name,optional"` // 真实姓名
|
||||
Status *int64 `json:"status,optional"` // 状态:0-禁用,1-启用
|
||||
RoleIds []int64 `json:"role_ids,optional"` // 关联的角色ID列表
|
||||
}
|
||||
AdminUpdateUserReq {
|
||||
Id string `path:"id"` // 用户ID
|
||||
Username *string `json:"username,optional"` // 用户名
|
||||
RealName *string `json:"real_name,optional"` // 真实姓名
|
||||
Status *int64 `json:"status,optional"` // 状态:0-禁用,1-启用
|
||||
RoleIds []string `json:"role_ids,optional"` // 关联的角色ID列表
|
||||
}
|
||||
|
||||
// 更新响应
|
||||
AdminUpdateUserResp {
|
||||
@@ -111,9 +111,9 @@ type (
|
||||
}
|
||||
|
||||
// 删除请求
|
||||
AdminDeleteUserReq {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
}
|
||||
AdminDeleteUserReq {
|
||||
Id string `path:"id"` // 用户ID
|
||||
}
|
||||
|
||||
// 删除响应
|
||||
AdminDeleteUserResp {
|
||||
@@ -132,13 +132,13 @@ type (
|
||||
}
|
||||
|
||||
// 重置密码请求
|
||||
AdminResetPasswordReq {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
Password string `json:"password"` // 新密码
|
||||
}
|
||||
AdminResetPasswordReq {
|
||||
Id string `path:"id"` // 用户ID
|
||||
Password string `json:"password"` // 新密码
|
||||
}
|
||||
|
||||
// 重置密码响应
|
||||
AdminResetPasswordResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,8 +7,8 @@ info (
|
||||
)
|
||||
|
||||
@server (
|
||||
prefix: api/v1/admin/menu
|
||||
group: admin_menu
|
||||
prefix: api/v1/admin/menu
|
||||
group: admin_menu
|
||||
middleware: AdminAuthInterceptor
|
||||
)
|
||||
service main {
|
||||
@@ -40,100 +40,88 @@ service main {
|
||||
type (
|
||||
// 列表请求
|
||||
GetMenuListReq {
|
||||
Name string `form:"name,optional"` // 菜单名称
|
||||
Path string `form:"path,optional"` // 路由路径
|
||||
Name string `form:"name,optional"` // 菜单名称
|
||||
Path string `form:"path,optional"` // 路由路径
|
||||
Status int64 `form:"status,optional,default=-1"` // 状态:0-禁用,1-启用
|
||||
Type string `form:"type,optional"` // 类型
|
||||
Type string `form:"type,optional"` // 类型
|
||||
}
|
||||
|
||||
// 列表项
|
||||
MenuListItem {
|
||||
Id int64 `json:"id"` // 菜单ID
|
||||
Pid int64 `json:"pid"` // 父菜单ID
|
||||
Name string `json:"name"` // 路由名称
|
||||
Path string `json:"path"` // 路由路径
|
||||
Component string `json:"component"` // 组件路径
|
||||
Redirect string `json:"redirect"` // 重定向路径
|
||||
Meta map[string]interface{} `json:"meta"` // 路由元数据
|
||||
Status int64 `json:"status"` // 状态:0-禁用,1-启用
|
||||
Type string `json:"type"` // 类型
|
||||
Sort int64 `json:"sort"` // 排序
|
||||
Id string `json:"id"` // 菜单ID
|
||||
Pid string `json:"pid"` // 父菜单ID
|
||||
Name string `json:"name"` // 路由名称
|
||||
Path string `json:"path"` // 路由路径
|
||||
Component string `json:"component"` // 组件路径
|
||||
Redirect string `json:"redirect"` // 重定向路径
|
||||
Meta map[string]interface{} `json:"meta"` // 路由元数据
|
||||
Status int64 `json:"status"` // 状态:0-禁用,1-启用
|
||||
Type string `json:"type"` // 类型
|
||||
Sort int64 `json:"sort"` // 排序
|
||||
CreateTime string `json:"createTime"` // 创建时间
|
||||
Children []MenuListItem `json:"children"` // 子菜单
|
||||
Children []MenuListItem `json:"children"` // 子菜单
|
||||
}
|
||||
|
||||
// 详情请求
|
||||
GetMenuDetailReq {
|
||||
Id int64 `path:"id"` // 菜单ID
|
||||
Id string `path:"id"` // 菜单ID
|
||||
}
|
||||
|
||||
// 详情响应
|
||||
GetMenuDetailResp {
|
||||
Id int64 `json:"id"` // 菜单ID
|
||||
Pid int64 `json:"pid"` // 父菜单ID
|
||||
Name string `json:"name"` // 路由名称
|
||||
Path string `json:"path"` // 路由路径
|
||||
Component string `json:"component"` // 组件路径
|
||||
Redirect string `json:"redirect"` // 重定向路径
|
||||
Meta map[string]interface{} `json:"meta"` // 路由元数据
|
||||
Status int64 `json:"status"` // 状态:0-禁用,1-启用
|
||||
Type string `json:"type"` // 类型
|
||||
Sort int64 `json:"sort"` // 排序
|
||||
Id string `json:"id"` // 菜单ID
|
||||
Pid string `json:"pid"` // 父菜单ID
|
||||
Name string `json:"name"` // 路由名称
|
||||
Path string `json:"path"` // 路由路径
|
||||
Component string `json:"component"` // 组件路径
|
||||
Redirect string `json:"redirect"` // 重定向路径
|
||||
Meta map[string]interface{} `json:"meta"` // 路由元数据
|
||||
Status int64 `json:"status"` // 状态:0-禁用,1-启用
|
||||
Type string `json:"type"` // 类型
|
||||
Sort int64 `json:"sort"` // 排序
|
||||
CreateTime string `json:"createTime"` // 创建时间
|
||||
UpdateTime string `json:"updateTime"` // 更新时间
|
||||
}
|
||||
|
||||
// 创建请求
|
||||
CreateMenuReq {
|
||||
Pid int64 `json:"pid,optional"` // 父菜单ID
|
||||
Name string `json:"name"` // 路由名称
|
||||
Path string `json:"path,optional"` // 路由路径
|
||||
Component string `json:"component,optional"` // 组件路径
|
||||
Redirect string `json:"redirect,optional"` // 重定向路径
|
||||
Meta map[string]interface{} `json:"meta"` // 路由元数据
|
||||
Pid string `json:"pid,optional"` // 父菜单ID
|
||||
Name string `json:"name"` // 路由名称
|
||||
Path string `json:"path,optional"` // 路由路径
|
||||
Component string `json:"component,optional"` // 组件路径
|
||||
Redirect string `json:"redirect,optional"` // 重定向路径
|
||||
Meta map[string]interface{} `json:"meta"` // 路由元数据
|
||||
Status int64 `json:"status,optional,default=1"` // 状态:0-禁用,1-启用
|
||||
Type string `json:"type"` // 类型
|
||||
Sort int64 `json:"sort,optional"` // 排序
|
||||
Type string `json:"type"` // 类型
|
||||
Sort int64 `json:"sort,optional"` // 排序
|
||||
}
|
||||
|
||||
// 创建响应
|
||||
CreateMenuResp {
|
||||
Id int64 `json:"id"` // 菜单ID
|
||||
Id string `json:"id"` // 菜单ID
|
||||
}
|
||||
|
||||
// 更新请求
|
||||
UpdateMenuReq {
|
||||
Id int64 `path:"id"` // 菜单ID
|
||||
Pid int64 `json:"pid,optional"` // 父菜单ID
|
||||
Name string `json:"name"` // 路由名称
|
||||
Path string `json:"path,optional"` // 路由路径
|
||||
Id string `path:"id"` // 菜单ID
|
||||
Pid *string `json:"pid,optional"` // 父菜单ID
|
||||
Name string `json:"name"` // 路由名称
|
||||
Path string `json:"path,optional"` // 路由路径
|
||||
Component string `json:"component,optional"` // 组件路径
|
||||
Redirect string `json:"redirect,optional"` // 重定向路径
|
||||
Meta map[string]interface{} `json:"meta"` // 路由元数据
|
||||
Status int64 `json:"status,optional"` // 状态:0-禁用,1-启用
|
||||
Type string `json:"type"` // 类型
|
||||
Sort int64 `json:"sort,optional"` // 排序
|
||||
Redirect string `json:"redirect,optional"` // 重定向路径
|
||||
Meta map[string]interface{} `json:"meta"` // 路由元数据
|
||||
Status int64 `json:"status,optional"` // 状态:0-禁用,1-启用
|
||||
Type string `json:"type"` // 类型
|
||||
Sort int64 `json:"sort,optional"` // 排序
|
||||
}
|
||||
|
||||
// 更新响应
|
||||
UpdateMenuResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
// 删除请求
|
||||
DeleteMenuReq {
|
||||
Id int64 `path:"id"` // 菜单ID
|
||||
Id string `path:"id"` // 菜单ID
|
||||
}
|
||||
|
||||
// 删除响应
|
||||
DeleteMenuResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
// 获取所有菜单请求
|
||||
GetMenuAllReq {
|
||||
}
|
||||
|
||||
GetMenuAllReq {}
|
||||
// 获取所有菜单响应
|
||||
GetMenuAllResp {
|
||||
Name string `json:"name"`
|
||||
@@ -144,4 +132,5 @@ type (
|
||||
Meta map[string]interface{} `json:"meta"`
|
||||
Children []GetMenuAllResp `json:"children"`
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -14,14 +14,14 @@ type (
|
||||
}
|
||||
|
||||
// 创建通知响应
|
||||
AdminCreateNotificationResp {
|
||||
Id int64 `json:"id"` // 通知ID
|
||||
}
|
||||
AdminCreateNotificationResp {
|
||||
Id string `json:"id"` // 通知ID
|
||||
}
|
||||
|
||||
// 更新通知请求
|
||||
AdminUpdateNotificationReq {
|
||||
Id int64 `path:"id"` // 通知ID
|
||||
Title *string `json:"title,optional"` // 通知标题
|
||||
AdminUpdateNotificationReq {
|
||||
Id string `path:"id"` // 通知ID
|
||||
Title *string `json:"title,optional"` // 通知标题
|
||||
Content *string `json:"content,optional"` // 通知内容
|
||||
NotificationPage *string `json:"notification_page,optional"` // 通知页面
|
||||
StartDate *string `json:"start_date,optional"` // 生效开始日期
|
||||
@@ -37,9 +37,9 @@ type (
|
||||
}
|
||||
|
||||
// 删除通知请求
|
||||
AdminDeleteNotificationReq {
|
||||
Id int64 `path:"id"` // 通知ID
|
||||
}
|
||||
AdminDeleteNotificationReq {
|
||||
Id string `path:"id"` // 通知ID
|
||||
}
|
||||
|
||||
// 删除通知响应
|
||||
AdminDeleteNotificationResp {
|
||||
@@ -47,14 +47,14 @@ type (
|
||||
}
|
||||
|
||||
// 获取通知详情请求
|
||||
AdminGetNotificationDetailReq {
|
||||
Id int64 `path:"id"` // 通知ID
|
||||
}
|
||||
AdminGetNotificationDetailReq {
|
||||
Id string `path:"id"` // 通知ID
|
||||
}
|
||||
|
||||
// 获取通知详情响应
|
||||
AdminGetNotificationDetailResp {
|
||||
Id int64 `json:"id"` // 通知ID
|
||||
Title string `json:"title"` // 通知标题
|
||||
AdminGetNotificationDetailResp {
|
||||
Id string `json:"id"` // 通知ID
|
||||
Title string `json:"title"` // 通知标题
|
||||
Content string `json:"content"` // 通知内容
|
||||
NotificationPage string `json:"notification_page"` // 通知页面
|
||||
StartDate string `json:"start_date"` // 生效开始日期
|
||||
@@ -78,9 +78,9 @@ type (
|
||||
}
|
||||
|
||||
// 通知列表项
|
||||
NotificationListItem {
|
||||
Id int64 `json:"id"` // 通知ID
|
||||
Title string `json:"title"` // 通知标题
|
||||
NotificationListItem {
|
||||
Id string `json:"id"` // 通知ID
|
||||
Title string `json:"title"` // 通知标题
|
||||
NotificationPage string `json:"notification_page"` // 通知页面
|
||||
Content string `json:"content"` // 通知内容
|
||||
StartDate string `json:"start_date"` // 生效开始日期
|
||||
@@ -125,4 +125,4 @@ service main {
|
||||
// 获取通知列表
|
||||
@handler AdminGetNotificationList
|
||||
get /list (AdminGetNotificationListReq) returns (AdminGetNotificationListResp)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,8 +66,8 @@ type (
|
||||
Items []OrderListItem `json:"items"` // 列表
|
||||
}
|
||||
// 列表项
|
||||
OrderListItem {
|
||||
Id int64 `json:"id"` // 订单ID
|
||||
OrderListItem {
|
||||
Id string `json:"id"` // 订单ID
|
||||
OrderNo string `json:"order_no"` // 商户订单号
|
||||
PlatformOrderId string `json:"platform_order_id"` // 支付订单号
|
||||
ProductName string `json:"product_name"` // 产品名称
|
||||
@@ -83,12 +83,12 @@ type (
|
||||
AgentProcessStatus string `json:"agent_process_status"` // 代理事务处理状态:not_agent-非代理订单,success-处理成功,failed-处理失败,pending-待处理
|
||||
}
|
||||
// 详情请求
|
||||
AdminGetOrderDetailReq {
|
||||
Id int64 `path:"id"` // 订单ID
|
||||
AdminGetOrderDetailReq {
|
||||
Id string `path:"id"` // 订单ID
|
||||
}
|
||||
// 详情响应
|
||||
AdminGetOrderDetailResp {
|
||||
Id int64 `json:"id"` // 订单ID
|
||||
AdminGetOrderDetailResp {
|
||||
Id string `json:"id"` // 订单ID
|
||||
OrderNo string `json:"order_no"` // 商户订单号
|
||||
PlatformOrderId string `json:"platform_order_id"` // 支付订单号
|
||||
ProductName string `json:"product_name"` // 产品名称
|
||||
@@ -115,12 +115,12 @@ type (
|
||||
Status string `json:"status,default=pending"` // 支付状态:pending-待支付,paid-已支付,refunded-已退款,closed-已关闭,failed-支付失败
|
||||
}
|
||||
// 创建响应
|
||||
AdminCreateOrderResp {
|
||||
Id int64 `json:"id"` // 订单ID
|
||||
AdminCreateOrderResp {
|
||||
Id string `json:"id"` // 订单ID
|
||||
}
|
||||
// 更新请求
|
||||
AdminUpdateOrderReq {
|
||||
Id int64 `path:"id"` // 订单ID
|
||||
AdminUpdateOrderReq {
|
||||
Id string `path:"id"` // 订单ID
|
||||
OrderNo *string `json:"order_no,optional"` // 商户订单号
|
||||
PlatformOrderId *string `json:"platform_order_id,optional"` // 支付订单号
|
||||
ProductName *string `json:"product_name,optional"` // 产品名称
|
||||
@@ -136,16 +136,16 @@ type (
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
// 删除请求
|
||||
AdminDeleteOrderReq {
|
||||
Id int64 `path:"id"` // 订单ID
|
||||
AdminDeleteOrderReq {
|
||||
Id string `path:"id"` // 订单ID
|
||||
}
|
||||
// 删除响应
|
||||
AdminDeleteOrderResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
// 退款请求
|
||||
AdminRefundOrderReq {
|
||||
Id int64 `path:"id"` // 订单ID
|
||||
AdminRefundOrderReq {
|
||||
Id string `path:"id"` // 订单ID
|
||||
RefundAmount float64 `json:"refund_amount"` // 退款金额
|
||||
RefundReason string `json:"refund_reason"` // 退款原因
|
||||
}
|
||||
@@ -156,8 +156,8 @@ type (
|
||||
Amount float64 `json:"amount"` // 退款金额
|
||||
}
|
||||
// 重新执行代理处理请求
|
||||
AdminRetryAgentProcessReq {
|
||||
Id int64 `path:"id"` // 订单ID
|
||||
AdminRetryAgentProcessReq {
|
||||
Id string `path:"id"` // 订单ID
|
||||
}
|
||||
// 重新执行代理处理响应
|
||||
AdminRetryAgentProcessResp {
|
||||
@@ -165,4 +165,4 @@ type (
|
||||
Message string `json:"message"` // 执行结果消息
|
||||
ProcessedAt string `json:"processed_at"` // 处理时间
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,9 +7,9 @@ info (
|
||||
)
|
||||
|
||||
// 平台用户管理接口
|
||||
@server(
|
||||
prefix: /api/v1/admin/platform_user
|
||||
group: admin_platform_user
|
||||
@server (
|
||||
prefix: /api/v1/admin/platform_user
|
||||
group: admin_platform_user
|
||||
middleware: AdminAuthInterceptor
|
||||
)
|
||||
service main {
|
||||
@@ -37,86 +37,77 @@ service main {
|
||||
type (
|
||||
// 分页列表请求
|
||||
AdminGetPlatformUserListReq {
|
||||
Page int64 `form:"page,default=1"` // 页码
|
||||
PageSize int64 `form:"pageSize,default=20"` // 每页数量
|
||||
Mobile string `form:"mobile,optional"` // 手机号
|
||||
Nickname string `form:"nickname,optional"` // 昵称
|
||||
Inside int64 `form:"inside,optional"` // 是否内部用户 1-是 0-否
|
||||
Page int64 `form:"page,default=1"` // 页码
|
||||
PageSize int64 `form:"pageSize,default=20"` // 每页数量
|
||||
Mobile string `form:"mobile,optional"` // 手机号
|
||||
Nickname string `form:"nickname,optional"` // 昵称
|
||||
Inside int64 `form:"inside,optional"` // 是否内部用户 1-是 0-否
|
||||
CreateTimeStart string `form:"create_time_start,optional"` // 创建时间开始
|
||||
CreateTimeEnd string `form:"create_time_end,optional"` // 创建时间结束
|
||||
OrderBy string `form:"order_by,optional"` // 排序字段
|
||||
OrderType string `form:"order_type,optional"` // 排序类型
|
||||
CreateTimeEnd string `form:"create_time_end,optional"` // 创建时间结束
|
||||
OrderBy string `form:"order_by,optional"` // 排序字段
|
||||
OrderType string `form:"order_type,optional"` // 排序类型
|
||||
}
|
||||
|
||||
// 分页列表响应
|
||||
AdminGetPlatformUserListResp {
|
||||
Total int64 `json:"total"` // 总数
|
||||
Items []PlatformUserListItem `json:"items"` // 列表
|
||||
}
|
||||
|
||||
// 列表项
|
||||
PlatformUserListItem {
|
||||
Id int64 `json:"id"` // 用户ID
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
Nickname string `json:"nickname"` // 昵称
|
||||
Info string `json:"info"` // 备注信息
|
||||
Inside int64 `json:"inside"` // 是否内部用户 1-是 0-否
|
||||
Id string `json:"id"` // 用户ID
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
Nickname string `json:"nickname"` // 昵称
|
||||
Info string `json:"info"` // 备注信息
|
||||
Inside int64 `json:"inside"` // 是否内部用户 1-是 0-否
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
|
||||
// 详情请求
|
||||
AdminGetPlatformUserDetailReq {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
Id string `path:"id"` // 用户ID
|
||||
}
|
||||
|
||||
// 详情响应
|
||||
AdminGetPlatformUserDetailResp {
|
||||
Id int64 `json:"id"` // 用户ID
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
Nickname string `json:"nickname"` // 昵称
|
||||
Info string `json:"info"` // 备注信息
|
||||
Inside int64 `json:"inside"` // 是否内部用户 1-是 0-否
|
||||
Id string `json:"id"` // 用户ID
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
Nickname string `json:"nickname"` // 昵称
|
||||
Info string `json:"info"` // 备注信息
|
||||
Inside int64 `json:"inside"` // 是否内部用户 1-是 0-否
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
}
|
||||
|
||||
// 创建请求
|
||||
AdminCreatePlatformUserReq {
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
Password string `json:"password"` // 密码
|
||||
Nickname string `json:"nickname"` // 昵称
|
||||
Info string `json:"info"` // 备注信息
|
||||
Inside int64 `json:"inside"` // 是否内部用户 1-是 0-否
|
||||
Info string `json:"info"` // 备注信息
|
||||
Inside int64 `json:"inside"` // 是否内部用户 1-是 0-否
|
||||
}
|
||||
|
||||
// 创建响应
|
||||
AdminCreatePlatformUserResp {
|
||||
Id int64 `json:"id"` // 用户ID
|
||||
Id string `json:"id"` // 用户ID
|
||||
}
|
||||
|
||||
// 更新请求
|
||||
AdminUpdatePlatformUserReq {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
Mobile *string `json:"mobile,optional"` // 手机号
|
||||
Id string `path:"id"` // 用户ID
|
||||
Mobile *string `json:"mobile,optional"` // 手机号
|
||||
Password *string `json:"password,optional"` // 密码
|
||||
Nickname *string `json:"nickname,optional"` // 昵称
|
||||
Info *string `json:"info,optional"` // 备注信息
|
||||
Inside *int64 `json:"inside,optional"` // 是否内部用户 1-是 0-否
|
||||
Info *string `json:"info,optional"` // 备注信息
|
||||
Inside *int64 `json:"inside,optional"` // 是否内部用户 1-是 0-否
|
||||
}
|
||||
|
||||
// 更新响应
|
||||
AdminUpdatePlatformUserResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
|
||||
// 删除请求
|
||||
AdminDeletePlatformUserReq {
|
||||
Id int64 `path:"id"` // 用户ID
|
||||
Id string `path:"id"` // 用户ID
|
||||
}
|
||||
|
||||
// 删除响应
|
||||
AdminDeletePlatformUserResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -50,25 +50,25 @@ type (
|
||||
}
|
||||
|
||||
// 列表项
|
||||
RoleListItem {
|
||||
Id int64 `json:"id"` // 角色ID
|
||||
RoleName string `json:"role_name"` // 角色名称
|
||||
RoleListItem {
|
||||
Id string `json:"id"` // 角色ID
|
||||
RoleName string `json:"role_name"` // 角色名称
|
||||
RoleCode string `json:"role_code"` // 角色编码
|
||||
Description string `json:"description"` // 角色描述
|
||||
Status int64 `json:"status"` // 状态:0-禁用,1-启用
|
||||
Sort int64 `json:"sort"` // 排序
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
MenuIds []int64 `json:"menu_ids"` // 关联的菜单ID列表
|
||||
}
|
||||
MenuIds []string `json:"menu_ids"` // 关联的菜单ID列表
|
||||
}
|
||||
|
||||
// 详情请求
|
||||
GetRoleDetailReq {
|
||||
Id int64 `path:"id"` // 角色ID
|
||||
}
|
||||
GetRoleDetailReq {
|
||||
Id string `path:"id"` // 角色ID
|
||||
}
|
||||
|
||||
// 详情响应
|
||||
GetRoleDetailResp {
|
||||
Id int64 `json:"id"` // 角色ID
|
||||
GetRoleDetailResp {
|
||||
Id string `json:"id"` // 角色ID
|
||||
RoleName string `json:"role_name"` // 角色名称
|
||||
RoleCode string `json:"role_code"` // 角色编码
|
||||
Description string `json:"description"` // 角色描述
|
||||
@@ -76,34 +76,34 @@ type (
|
||||
Sort int64 `json:"sort"` // 排序
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
MenuIds []int64 `json:"menu_ids"` // 关联的菜单ID列表
|
||||
}
|
||||
MenuIds []string `json:"menu_ids"` // 关联的菜单ID列表
|
||||
}
|
||||
|
||||
// 创建请求
|
||||
CreateRoleReq {
|
||||
CreateRoleReq {
|
||||
RoleName string `json:"role_name"` // 角色名称
|
||||
RoleCode string `json:"role_code"` // 角色编码
|
||||
Description string `json:"description"` // 角色描述
|
||||
Status int64 `json:"status,default=1"` // 状态:0-禁用,1-启用
|
||||
Sort int64 `json:"sort,default=0"` // 排序
|
||||
MenuIds []int64 `json:"menu_ids"` // 关联的菜单ID列表
|
||||
}
|
||||
MenuIds []string `json:"menu_ids"` // 关联的菜单ID列表
|
||||
}
|
||||
|
||||
// 创建响应
|
||||
CreateRoleResp {
|
||||
Id int64 `json:"id"` // 角色ID
|
||||
}
|
||||
CreateRoleResp {
|
||||
Id string `json:"id"` // 角色ID
|
||||
}
|
||||
|
||||
// 更新请求
|
||||
UpdateRoleReq {
|
||||
Id int64 `path:"id"` // 角色ID
|
||||
UpdateRoleReq {
|
||||
Id string `path:"id"` // 角色ID
|
||||
RoleName *string `json:"role_name,optional"` // 角色名称
|
||||
RoleCode *string `json:"role_code,optional"` // 角色编码
|
||||
Description *string `json:"description,optional"` // 角色描述
|
||||
Status *int64 `json:"status,optional"` // 状态:0-禁用,1-启用
|
||||
Sort *int64 `json:"sort,optional"` // 排序
|
||||
MenuIds []int64 `json:"menu_ids,optional"` // 关联的菜单ID列表
|
||||
}
|
||||
MenuIds []string `json:"menu_ids,optional"` // 关联的菜单ID列表
|
||||
}
|
||||
|
||||
// 更新响应
|
||||
UpdateRoleResp {
|
||||
@@ -111,12 +111,12 @@ type (
|
||||
}
|
||||
|
||||
// 删除请求
|
||||
DeleteRoleReq {
|
||||
Id int64 `path:"id"` // 角色ID
|
||||
}
|
||||
DeleteRoleReq {
|
||||
Id string `path:"id"` // 角色ID
|
||||
}
|
||||
|
||||
// 删除响应
|
||||
DeleteRoleResp {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
@@ -32,8 +32,8 @@ type (
|
||||
LinkIdentifier string `form:"link_identifier"` // 推广链接标识
|
||||
}
|
||||
GetLinkDataResp {
|
||||
AgentId int64 `json:"agent_id"` // 代理ID
|
||||
ProductId int64 `json:"product_id"` // 产品ID
|
||||
AgentId string `json:"agent_id"` // 代理ID
|
||||
ProductId string `json:"product_id"` // 产品ID
|
||||
SetPrice float64 `json:"set_price"` // 代理设定价格
|
||||
ActualBasePrice float64 `json:"actual_base_price"` // 实际底价
|
||||
ProductName string `json:"product_name"` // 产品名称
|
||||
@@ -43,31 +43,37 @@ type (
|
||||
Features []Feature `json:"features"` // 产品功能列表
|
||||
}
|
||||
AgentApplyReq {
|
||||
Region string `json:"region,optional"` // 区域(可选)
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
Code string `json:"code"` // 验证码
|
||||
InviteCode string `json:"invite_code"` // 邀请码(必填,只能通过邀请码成为代理)
|
||||
Region string `json:"region,optional"`
|
||||
Mobile string `json:"mobile"`
|
||||
Code string `json:"code"`
|
||||
Referrer string `json:"referrer"`
|
||||
InviteCode string `json:"invite_code,optional"`
|
||||
AgentCode int64 `json:"agent_code,optional"`
|
||||
}
|
||||
AgentApplyResp {
|
||||
AccessToken string `json:"accessToken"`
|
||||
AccessExpire int64 `json:"accessExpire"`
|
||||
RefreshAfter int64 `json:"refreshAfter"`
|
||||
AgentCode int64 `json:"agent_code"`
|
||||
}
|
||||
// 通过邀请码注册
|
||||
RegisterByInviteCodeReq {
|
||||
InviteCode string `json:"invite_code"` // 邀请码
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
Code string `json:"code"` // 验证码
|
||||
Region string `json:"region,optional"` // 区域(可选)
|
||||
WechatId string `json:"wechat_id,optional"` // 微信号(可选)
|
||||
Referrer string `json:"referrer"`
|
||||
InviteCode string `json:"invite_code,optional"`
|
||||
AgentCode int64 `json:"agent_code,optional"`
|
||||
Mobile string `json:"mobile"`
|
||||
Code string `json:"code"`
|
||||
Region string `json:"region,optional"`
|
||||
WechatId string `json:"wechat_id,optional"`
|
||||
}
|
||||
RegisterByInviteCodeResp {
|
||||
AccessToken string `json:"accessToken"`
|
||||
AccessExpire int64 `json:"accessExpire"`
|
||||
RefreshAfter int64 `json:"refreshAfter"`
|
||||
AgentId int64 `json:"agent_id"` // 代理ID
|
||||
AgentId string `json:"agent_id"` // 代理ID
|
||||
Level int64 `json:"level"` // 代理等级
|
||||
LevelName string `json:"level_name"` // 等级名称
|
||||
AgentCode int64 `json:"agent_code"`
|
||||
}
|
||||
// 生成邀请码
|
||||
GenerateInviteCodeReq {
|
||||
@@ -89,7 +95,7 @@ type (
|
||||
List []InviteCodeItem `json:"list"` // 列表
|
||||
}
|
||||
InviteCodeItem {
|
||||
Id int64 `json:"id"` // 记录ID
|
||||
Id string `json:"id"` // 记录ID
|
||||
Code string `json:"code"` // 邀请码
|
||||
TargetLevel int64 `json:"target_level"` // 目标等级
|
||||
Status int64 `json:"status"` // 状态:0=未使用,1=已使用,2=已失效
|
||||
@@ -100,7 +106,7 @@ type (
|
||||
}
|
||||
// 删除邀请码
|
||||
DeleteInviteCodeReq {
|
||||
Id int64 `json:"id"` // 邀请码ID
|
||||
Id string `json:"id"` // 邀请码ID
|
||||
}
|
||||
DeleteInviteCodeResp {}
|
||||
// 获取邀请链接
|
||||
@@ -113,18 +119,22 @@ type (
|
||||
}
|
||||
// 获取代理等级特权信息
|
||||
GetLevelPrivilegeResp {
|
||||
Levels []LevelPrivilegeItem `json:"levels"` // 各等级特权信息列表
|
||||
Levels []LevelPrivilegeItem `json:"levels"`
|
||||
UpgradeToGoldFee float64 `json:"upgrade_to_gold_fee"`
|
||||
UpgradeToDiamondFee float64 `json:"upgrade_to_diamond_fee"`
|
||||
UpgradeToGoldRebate float64 `json:"upgrade_to_gold_rebate"`
|
||||
UpgradeToDiamondRebate float64 `json:"upgrade_to_diamond_rebate"`
|
||||
}
|
||||
LevelPrivilegeItem {
|
||||
Level int64 `json:"level"` // 等级:1=普通,2=黄金,3=钻石
|
||||
LevelName string `json:"level_name"` // 等级名称
|
||||
LevelBonus float64 `json:"level_bonus"` // 等级加成(元)
|
||||
PriceReduction float64 `json:"price_reduction"` // 底价降低(元,相对于当前等级)
|
||||
PromoteRebate string `json:"promote_rebate"` // 推广返佣说明
|
||||
MaxPromoteRebate float64 `json:"max_promote_rebate"` // 最高推广返佣金额(元)
|
||||
UpgradeRebate string `json:"upgrade_rebate"` // 下级升级返佣说明
|
||||
Privileges []string `json:"privileges"` // 特权列表
|
||||
CanUpgradeSubordinate bool `json:"can_upgrade_subordinate"` // 是否可以升级下级
|
||||
Level int64 `json:"level"` // 等级:1=普通,2=黄金,3=钻石
|
||||
LevelName string `json:"level_name"` // 等级名称
|
||||
LevelBonus float64 `json:"level_bonus"` // 等级加成(元)
|
||||
PriceReduction float64 `json:"price_reduction"` // 底价降低(元,相对于当前等级)
|
||||
PromoteRebate string `json:"promote_rebate"` // 推广返佣说明
|
||||
MaxPromoteRebate float64 `json:"max_promote_rebate"` // 最高推广返佣金额(元)
|
||||
UpgradeRebate string `json:"upgrade_rebate"` // 下级升级返佣说明
|
||||
Privileges []string `json:"privileges"` // 特权列表
|
||||
CanUpgradeSubordinate bool `json:"can_upgrade_subordinate"` // 是否可以升级下级
|
||||
}
|
||||
)
|
||||
|
||||
@@ -229,23 +239,28 @@ service main {
|
||||
// 获取代理等级特权信息
|
||||
@handler GetLevelPrivilege
|
||||
get /level/privilege returns (GetLevelPrivilegeResp)
|
||||
|
||||
// 获取推广查询报告列表
|
||||
@handler GetPromotionQueryList
|
||||
get /promotion/query/list (GetPromotionQueryListReq) returns (GetPromotionQueryListResp)
|
||||
}
|
||||
|
||||
type (
|
||||
// 代理信息
|
||||
AgentInfoResp {
|
||||
AgentId int64 `json:"agent_id"` // 代理ID
|
||||
Level int64 `json:"level"` // 代理等级:1=普通,2=黄金,3=钻石
|
||||
LevelName string `json:"level_name"` // 等级名称
|
||||
Region string `json:"region"` // 区域(可选)
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
WechatId string `json:"wechat_id"` // 微信号(可选)
|
||||
TeamLeaderId int64 `json:"team_leader_id"` // 团队首领ID
|
||||
IsRealName bool `json:"is_real_name"` // 是否已实名
|
||||
AgentId string `json:"agent_id"`
|
||||
Level int64 `json:"level"`
|
||||
LevelName string `json:"level_name"`
|
||||
Region string `json:"region"`
|
||||
Mobile string `json:"mobile"`
|
||||
WechatId string `json:"wechat_id"`
|
||||
TeamLeaderId string `json:"team_leader_id"`
|
||||
IsRealName bool `json:"is_real_name"`
|
||||
AgentCode int64 `json:"agent_code"`
|
||||
}
|
||||
// 生成推广链接
|
||||
AgentGeneratingLinkReq {
|
||||
ProductId int64 `json:"product_id"` // 产品ID
|
||||
ProductId string `json:"product_id"` // 产品ID
|
||||
SetPrice float64 `json:"set_price"` // 设定价格
|
||||
TargetPath string `json:"target_path,optional"` // 目标地址(可选,默认为推广报告页面)
|
||||
}
|
||||
@@ -258,7 +273,7 @@ type (
|
||||
List []ProductConfigItem `json:"list"`
|
||||
}
|
||||
ProductConfigItem {
|
||||
ProductId int64 `json:"product_id"` // 产品ID
|
||||
ProductId string `json:"product_id"` // 产品ID
|
||||
ProductName string `json:"product_name"` // 产品名称
|
||||
ProductEn string `json:"product_en"` // 产品英文标识
|
||||
ActualBasePrice float64 `json:"actual_base_price"` // 实际底价
|
||||
@@ -305,7 +320,7 @@ type (
|
||||
List []SubordinateItem `json:"list"` // 列表
|
||||
}
|
||||
SubordinateItem {
|
||||
AgentId int64 `json:"agent_id"` // 代理ID
|
||||
AgentId string `json:"agent_id"` // 代理ID
|
||||
Level int64 `json:"level"` // 等级
|
||||
LevelName string `json:"level_name"` // 等级名称
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
@@ -315,7 +330,7 @@ type (
|
||||
}
|
||||
// 下级贡献详情
|
||||
GetSubordinateContributionDetailReq {
|
||||
SubordinateId int64 `form:"subordinate_id"` // 下级代理ID
|
||||
SubordinateId string `form:"subordinate_id"` // 下级代理ID
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"page_size"` // 每页数量
|
||||
TabType string `form:"tab_type,optional"` // 标签页类型:order=订单列表,invite=邀请列表
|
||||
@@ -349,14 +364,14 @@ type (
|
||||
}
|
||||
OrderItem {
|
||||
OrderNo string `json:"order_no"` // 订单号
|
||||
ProductId int64 `json:"product_id"` // 产品ID
|
||||
ProductId string `json:"product_id"` // 产品ID
|
||||
ProductName string `json:"product_name"` // 产品名称
|
||||
OrderAmount float64 `json:"order_amount"` // 订单金额
|
||||
RebateAmount float64 `json:"rebate_amount"` // 返佣金额
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
}
|
||||
InviteItem {
|
||||
AgentId int64 `json:"agent_id"` // 代理ID
|
||||
AgentId string `json:"agent_id"` // 代理ID
|
||||
Level int64 `json:"level"` // 等级
|
||||
LevelName string `json:"level_name"` // 等级名称
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
@@ -385,7 +400,7 @@ type (
|
||||
MonthEarnings float64 `json:"month_earnings"` // 月收益
|
||||
}
|
||||
TeamMemberItem {
|
||||
AgentId int64 `json:"agent_id"` // 代理ID
|
||||
AgentId string `json:"agent_id"` // 代理ID
|
||||
Level int64 `json:"level"` // 等级
|
||||
LevelName string `json:"level_name"` // 等级名称
|
||||
Mobile string `json:"mobile"` // 手机号
|
||||
@@ -421,8 +436,8 @@ type (
|
||||
List []CommissionItem `json:"list"` // 列表
|
||||
}
|
||||
CommissionItem {
|
||||
Id int64 `json:"id"` // 记录ID
|
||||
OrderId int64 `json:"order_id"` // 订单ID
|
||||
Id string `json:"id"` // 记录ID
|
||||
OrderId string `json:"order_id"` // 订单ID
|
||||
OrderNo string `json:"order_no"` // 订单号
|
||||
ProductName string `json:"product_name"` // 产品名称
|
||||
Amount float64 `json:"amount"` // 佣金金额
|
||||
@@ -440,11 +455,11 @@ type (
|
||||
List []RebateItem `json:"list"` // 列表
|
||||
}
|
||||
RebateItem {
|
||||
Id int64 `json:"id"` // 记录ID
|
||||
SourceAgentId int64 `json:"source_agent_id"` // 来源代理ID
|
||||
Id string `json:"id"` // 记录ID
|
||||
SourceAgentId string `json:"source_agent_id"` // 来源代理ID
|
||||
SourceAgentMobile string `json:"source_agent_mobile"` // 来源代理手机号
|
||||
SourceAgentLevel int64 `json:"source_agent_level"` // 来源代理等级:1=普通,2=黄金,3=钻石
|
||||
OrderId int64 `json:"order_id"` // 订单ID
|
||||
OrderId string `json:"order_id"` // 订单ID
|
||||
OrderNo string `json:"order_no"` // 订单号
|
||||
RebateType int64 `json:"rebate_type"` // 返佣类型:1=直接上级,2=钻石上级,3=黄金上级
|
||||
Amount float64 `json:"amount"` // 返佣金额
|
||||
@@ -460,8 +475,8 @@ type (
|
||||
List []UpgradeRebateItem `json:"list"` // 列表
|
||||
}
|
||||
UpgradeRebateItem {
|
||||
Id int64 `json:"id"` // 记录ID
|
||||
SourceAgentId int64 `json:"source_agent_id"` // 来源代理ID(升级的代理)
|
||||
Id string `json:"id"` // 记录ID
|
||||
SourceAgentId string `json:"source_agent_id"` // 来源代理ID(升级的代理)
|
||||
SourceAgentMobile string `json:"source_agent_mobile"` // 来源代理手机号
|
||||
OrderNo string `json:"order_no"` // 订单号
|
||||
FromLevel int64 `json:"from_level"` // 原等级
|
||||
@@ -479,8 +494,8 @@ type (
|
||||
List []UpgradeItem `json:"list"` // 列表
|
||||
}
|
||||
UpgradeItem {
|
||||
Id int64 `json:"id"` // 记录ID
|
||||
AgentId int64 `json:"agent_id"` // 代理ID
|
||||
Id string `json:"id"` // 记录ID
|
||||
AgentId string `json:"agent_id"` // 代理ID
|
||||
FromLevel int64 `json:"from_level"` // 原等级
|
||||
ToLevel int64 `json:"to_level"` // 目标等级
|
||||
UpgradeType int64 `json:"upgrade_type"` // 升级类型:1=自主付费,2=钻石升级
|
||||
@@ -494,13 +509,13 @@ type (
|
||||
ToLevel int64 `json:"to_level"` // 目标等级:2=黄金,3=钻石
|
||||
}
|
||||
ApplyUpgradeResp {
|
||||
UpgradeId int64 `json:"upgrade_id"` // 升级记录ID
|
||||
UpgradeId string `json:"upgrade_id"` // 升级记录ID
|
||||
OrderNo string `json:"order_no"` // 支付订单号
|
||||
}
|
||||
// 钻石升级下级
|
||||
UpgradeSubordinateReq {
|
||||
SubordinateId int64 `json:"subordinate_id"` // 下级代理ID
|
||||
ToLevel int64 `json:"to_level"` // 目标等级(只能是2=黄金)
|
||||
SubordinateId string `json:"subordinate_id"` // 下级代理ID
|
||||
ToLevel int64 `json:"to_level"` // 目标等级(只能是2=黄金)
|
||||
}
|
||||
UpgradeSubordinateResp {
|
||||
Success bool `json:"success"`
|
||||
@@ -515,7 +530,7 @@ type (
|
||||
List []WithdrawalItem `json:"list"` // 列表
|
||||
}
|
||||
WithdrawalItem {
|
||||
Id int64 `json:"id"` // 记录ID
|
||||
Id string `json:"id"` // 记录ID
|
||||
WithdrawalNo string `json:"withdrawal_no"` // 提现单号
|
||||
Amount float64 `json:"amount"` // 提现金额
|
||||
TaxAmount float64 `json:"tax_amount"` // 税费金额
|
||||
@@ -533,7 +548,7 @@ type (
|
||||
PayeeName string `json:"payee_name"` // 收款人姓名
|
||||
}
|
||||
ApplyWithdrawalResp {
|
||||
WithdrawalId int64 `json:"withdrawal_id"` // 提现记录ID
|
||||
WithdrawalId string `json:"withdrawal_id"` // 提现记录ID
|
||||
WithdrawalNo string `json:"withdrawal_no"` // 提现单号
|
||||
}
|
||||
// 实名认证
|
||||
@@ -546,6 +561,22 @@ type (
|
||||
RealNameAuthResp {
|
||||
Status string `json:"status"` // 状态:pending=待审核,approved=已通过,rejected=已拒绝
|
||||
}
|
||||
// 推广查询列表
|
||||
GetPromotionQueryListReq {
|
||||
Page int64 `form:"page"` // 页码
|
||||
PageSize int64 `form:"page_size"` // 每页数量
|
||||
}
|
||||
GetPromotionQueryListResp {
|
||||
Total int64 `json:"total"` // 总数
|
||||
List []PromotionQueryItem `json:"list"` // 列表
|
||||
}
|
||||
PromotionQueryItem {
|
||||
Id string `json:"id"` // 查询ID
|
||||
OrderId string `json:"order_id"` // 订单ID
|
||||
ProductName string `json:"product_name"` // 产品名称
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
QueryState string `json:"query_state"` // 查询状态
|
||||
}
|
||||
)
|
||||
|
||||
// ============================================
|
||||
@@ -563,4 +594,3 @@ service main {
|
||||
type (
|
||||
ShortLinkRedirectResp {}
|
||||
)
|
||||
|
||||
|
||||
@@ -1,56 +1,50 @@
|
||||
type (
|
||||
// GetAuthorizationDocumentReq 获取授权书请求
|
||||
GetAuthorizationDocumentReq {
|
||||
DocumentId int64 `json:"documentId" validate:"required"` // 授权书ID
|
||||
DocumentId string `json:"documentId" validate:"required"` // 授权书ID
|
||||
}
|
||||
|
||||
// GetAuthorizationDocumentResp 获取授权书响应
|
||||
GetAuthorizationDocumentResp {
|
||||
DocumentId int64 `json:"documentId"` // 授权书ID
|
||||
UserId int64 `json:"userId"` // 用户ID
|
||||
OrderId int64 `json:"orderId"` // 订单ID
|
||||
QueryId int64 `json:"queryId"` // 查询ID
|
||||
FileName string `json:"fileName"` // 文件名
|
||||
FileUrl string `json:"fileUrl"` // 文件访问URL
|
||||
FileSize int64 `json:"fileSize"` // 文件大小
|
||||
FileType string `json:"fileType"` // 文件类型
|
||||
Status string `json:"status"` // 状态
|
||||
CreateTime string `json:"createTime"` // 创建时间
|
||||
DocumentId string `json:"documentId"` // 授权书ID
|
||||
UserId string `json:"userId"` // 用户ID
|
||||
OrderId string `json:"orderId"` // 订单ID
|
||||
QueryId string `json:"queryId"` // 查询ID
|
||||
FileName string `json:"fileName"` // 文件名
|
||||
FileUrl string `json:"fileUrl"` // 文件访问URL
|
||||
FileSize int64 `json:"fileSize"` // 文件大小
|
||||
FileType string `json:"fileType"` // 文件类型
|
||||
Status string `json:"status"` // 状态
|
||||
CreateTime string `json:"createTime"` // 创建时间
|
||||
}
|
||||
|
||||
// GetAuthorizationDocumentByOrderReq 根据订单ID获取授权书请求
|
||||
GetAuthorizationDocumentByOrderReq {
|
||||
OrderId int64 `json:"orderId" validate:"required"` // 订单ID
|
||||
OrderId string `json:"orderId" validate:"required"` // 订单ID
|
||||
}
|
||||
|
||||
// GetAuthorizationDocumentByOrderResp 根据订单ID获取授权书响应
|
||||
GetAuthorizationDocumentByOrderResp {
|
||||
Documents []AuthorizationDocumentInfo `json:"documents"` // 授权书列表
|
||||
}
|
||||
|
||||
// AuthorizationDocumentInfo 授权书信息
|
||||
AuthorizationDocumentInfo {
|
||||
DocumentId int64 `json:"documentId"` // 授权书ID
|
||||
UserId int64 `json:"userId"` // 用户ID
|
||||
OrderId int64 `json:"orderId"` // 订单ID
|
||||
QueryId int64 `json:"queryId"` // 查询ID
|
||||
FileName string `json:"fileName"` // 文件名
|
||||
FileUrl string `json:"fileUrl"` // 文件访问URL
|
||||
FileSize int64 `json:"fileSize"` // 文件大小
|
||||
FileType string `json:"fileType"` // 文件类型
|
||||
Status string `json:"status"` // 状态
|
||||
CreateTime string `json:"createTime"` // 创建时间
|
||||
DocumentId string `json:"documentId"` // 授权书ID
|
||||
UserId string `json:"userId"` // 用户ID
|
||||
OrderId string `json:"orderId"` // 订单ID
|
||||
QueryId string `json:"queryId"` // 查询ID
|
||||
FileName string `json:"fileName"` // 文件名
|
||||
FileUrl string `json:"fileUrl"` // 文件访问URL
|
||||
FileSize int64 `json:"fileSize"` // 文件大小
|
||||
FileType string `json:"fileType"` // 文件类型
|
||||
Status string `json:"status"` // 状态
|
||||
CreateTime string `json:"createTime"` // 创建时间
|
||||
}
|
||||
|
||||
// DownloadAuthorizationDocumentReq 下载授权书请求
|
||||
DownloadAuthorizationDocumentReq {
|
||||
DocumentId int64 `json:"documentId" validate:"required"` // 授权书ID
|
||||
DocumentId string `json:"documentId" validate:"required"` // 授权书ID
|
||||
}
|
||||
|
||||
// DownloadAuthorizationDocumentResp 下载授权书响应
|
||||
DownloadAuthorizationDocumentResp {
|
||||
FileName string `json:"fileName"` // 文件名
|
||||
FileUrl string `json:"fileUrl"` // 文件访问URL
|
||||
FileUrl string `json:"fileUrl"` // 文件访问URL
|
||||
}
|
||||
)
|
||||
|
||||
@@ -63,12 +57,13 @@ service main {
|
||||
// 获取授权书信息
|
||||
@handler GetAuthorizationDocument
|
||||
get /authorization/document/:documentId (GetAuthorizationDocumentReq) returns (GetAuthorizationDocumentResp)
|
||||
|
||||
|
||||
// 根据订单ID获取授权书列表
|
||||
@handler GetAuthorizationDocumentByOrder
|
||||
get /authorization/document/order/:orderId (GetAuthorizationDocumentByOrderReq) returns (GetAuthorizationDocumentByOrderResp)
|
||||
|
||||
|
||||
// 下载授权书文件
|
||||
@handler DownloadAuthorizationDocument
|
||||
get /authorization/download/:documentId (DownloadAuthorizationDocumentReq) returns (DownloadAuthorizationDocumentResp)
|
||||
}
|
||||
|
||||
|
||||
@@ -25,11 +25,10 @@ service main {
|
||||
}
|
||||
|
||||
@server (
|
||||
prefix: api/v1
|
||||
group: pay
|
||||
jwt: JwtAuth
|
||||
middleware: UserAuthInterceptor
|
||||
|
||||
prefix: api/v1
|
||||
group: pay
|
||||
jwt: JwtAuth
|
||||
middleware: AuthInterceptor
|
||||
)
|
||||
service main {
|
||||
// 支付
|
||||
@@ -65,7 +64,8 @@ type (
|
||||
|
||||
type (
|
||||
IapCallbackReq {
|
||||
OrderID int64 `json:"order_id" validate:"required"`
|
||||
OrderID string `json:"order_id" validate:"required"`
|
||||
TransactionReceipt string `json:"transaction_receipt" validate:"required"`
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ info (
|
||||
version: "v1"
|
||||
)
|
||||
type Feature {
|
||||
ID int64 `json:"id"` // 功能ID
|
||||
ApiID string `json:"api_id"` // API标识
|
||||
Name string `json:"name"` // 功能描述
|
||||
ID string `json:"id"` // 功能ID
|
||||
ApiID string `json:"api_id"` // API标识
|
||||
Name string `json:"name"` // 功能描述
|
||||
}
|
||||
// 产品基本类型定义
|
||||
type Product {
|
||||
@@ -34,7 +34,7 @@ service main {
|
||||
}
|
||||
|
||||
type GetProductByIDRequest {
|
||||
Id int64 `path:"id"`
|
||||
Id string `path:"id"`
|
||||
}
|
||||
|
||||
type GetProductByEnRequest {
|
||||
@@ -52,4 +52,4 @@ type ProductResponse {
|
||||
service main {
|
||||
@handler GetProductAppByEn
|
||||
get /app_en/:product_en (GetProductByEnRequest) returns (ProductResponse)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@ info (
|
||||
//============================> query v1 <============================
|
||||
// 查询基本类型定义
|
||||
type Query {
|
||||
Id int64 `json:"id"` // 主键ID
|
||||
OrderId int64 `json:"order_id"` // 订单ID
|
||||
UserId int64 `json:"user_id"` // 用户ID
|
||||
Id string `json:"id"` // 主键ID
|
||||
OrderId string `json:"order_id"` // 订单ID
|
||||
UserId string `json:"user_id"` // 用户ID
|
||||
Product string `json:"product"` // 产品ID
|
||||
ProductName string `json:"product_name"` // 产品ID
|
||||
QueryParams map[string]interface{} `json:"query_params"`
|
||||
@@ -68,7 +68,7 @@ type (
|
||||
prefix: api/v1
|
||||
group: query
|
||||
jwt: JwtAuth
|
||||
middleware: UserAuthInterceptor
|
||||
middleware: AuthInterceptor
|
||||
)
|
||||
service main {
|
||||
@doc "query service"
|
||||
@@ -80,7 +80,7 @@ service main {
|
||||
prefix: api/v1
|
||||
group: query
|
||||
jwt: JwtAuth
|
||||
middleware: UserAuthInterceptor
|
||||
middleware: AuthInterceptor
|
||||
)
|
||||
service main {
|
||||
@doc "获取查询临时订单"
|
||||
@@ -114,7 +114,7 @@ service main {
|
||||
|
||||
type (
|
||||
QueryGenerateShareLinkReq {
|
||||
OrderId *int64 `json:"order_id,optional"`
|
||||
OrderId *string `json:"order_id,optional"`
|
||||
OrderNo *string `json:"order_no,optional"`
|
||||
}
|
||||
QueryGenerateShareLinkResp {
|
||||
@@ -154,7 +154,7 @@ type (
|
||||
|
||||
type (
|
||||
QueryDetailByOrderIdReq {
|
||||
OrderId int64 `path:"order_id"`
|
||||
OrderId string `path:"order_id"`
|
||||
}
|
||||
)
|
||||
|
||||
@@ -166,7 +166,7 @@ type (
|
||||
|
||||
type (
|
||||
QueryRetryReq {
|
||||
Id int64 `path:"id"`
|
||||
Id string `path:"id"`
|
||||
}
|
||||
QueryRetryResp {
|
||||
Query
|
||||
@@ -175,11 +175,11 @@ type (
|
||||
|
||||
type (
|
||||
UpdateQueryDataReq {
|
||||
Id int64 `json:"id"` // 查询ID
|
||||
Id string `json:"id"` // 查询ID
|
||||
QueryData string `json:"query_data"` // 查询数据(未加密的JSON)
|
||||
}
|
||||
UpdateQueryDataResp {
|
||||
Id int64 `json:"id"`
|
||||
Id string `json:"id"`
|
||||
UpdatedAt string `json:"updated_at"` // 更新时间
|
||||
}
|
||||
)
|
||||
|
||||
@@ -9,10 +9,10 @@ info (
|
||||
//============================> user v1 <============================
|
||||
// 用户基本类型定义
|
||||
type User {
|
||||
Id int64 `json:"id"`
|
||||
Mobile string `json:"mobile"`
|
||||
NickName string `json:"nickName"`
|
||||
UserType int64 `json:"userType"`
|
||||
Id string `json:"id"`
|
||||
Mobile string `json:"mobile"`
|
||||
NickName string `json:"nickName"`
|
||||
UserType int64 `json:"userType"`
|
||||
}
|
||||
|
||||
//no need login
|
||||
@@ -21,6 +21,9 @@ type User {
|
||||
group: user
|
||||
)
|
||||
service main {
|
||||
@doc "unified auth"
|
||||
@handler auth
|
||||
post /user/auth (AuthReq) returns (AuthResp)
|
||||
@doc "mobile code login"
|
||||
@handler mobileCodeLogin
|
||||
post /user/mobileCodeLogin (MobileCodeLoginReq) returns (MobileCodeLoginResp)
|
||||
@@ -38,6 +41,18 @@ service main {
|
||||
}
|
||||
|
||||
type (
|
||||
AuthReq {
|
||||
Platform string `json:"platform"` // browser|wxh5|wxmini
|
||||
Code string `json:"code,optional"`
|
||||
}
|
||||
AuthResp {
|
||||
AccessToken string `json:"accessToken"`
|
||||
AccessExpire int64 `json:"accessExpire"`
|
||||
RefreshAfter int64 `json:"refreshAfter"`
|
||||
UserType int64 `json:"userType"`
|
||||
HasMobile bool `json:"hasMobile"`
|
||||
IsAgent bool `json:"isAgent"`
|
||||
}
|
||||
MobileCodeLoginReq {
|
||||
Mobile string `json:"mobile"`
|
||||
Code string `json:"code" validate:"required"`
|
||||
|
||||
Reference in New Issue
Block a user