This commit is contained in:
2026-03-02 12:46:26 +08:00
parent 9fe6a88670
commit 6db59f1dea
61 changed files with 5432 additions and 1706 deletions

View File

@@ -251,6 +251,32 @@ service main {
// 获取推广查询报告列表
@handler GetPromotionQueryList
get /promotion/query/list (GetPromotionQueryListReq) returns (GetPromotionQueryListResp)
// ============================================
// 用户模块白名单相关接口
// ============================================
@handler GetWhitelistFeatures
get /whitelist/features (GetWhitelistFeaturesReq) returns (GetWhitelistFeaturesResp)
// 创建白名单订单
@handler CreateWhitelistOrder
post /whitelist/order/create (CreateWhitelistOrderReq) returns (CreateWhitelistOrderResp)
// 获取用户白名单列表
@handler GetWhitelistList
get /whitelist/list (GetWhitelistListReq) returns (GetWhitelistListResp)
// 检查模块是否已下架(用于显示下架按钮状态)
@handler CheckFeatureWhitelistStatus
get /whitelist/check (CheckFeatureWhitelistStatusReq) returns (CheckFeatureWhitelistStatusResp)
// 下架单个模块(创建订单并支付)
@handler OfflineFeature
post /whitelist/offline (OfflineFeatureReq) returns (OfflineFeatureResp)
// 检查订单是否属于当前代理推广
@handler CheckOrderAgent
get /order/agent (CheckOrderAgentReq) returns (CheckOrderAgentResp)
}
type (
@@ -581,11 +607,82 @@ type (
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"` // 查询状态
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"` // 查询状态
Params map[string]interface{} `json:"params,optional"` // 查询参数(已脱敏)
Price float64 `json:"price"` // 查询价格
}
// ============================================
// 用户模块白名单相关类型
// ============================================
GetWhitelistFeaturesReq {}
GetWhitelistFeaturesResp {
List []WhitelistFeatureItem `json:"list"` // 可屏蔽的feature列表
}
WhitelistFeatureItem {
FeatureId string `json:"feature_id"` // Feature的UUID
FeatureApiId string `json:"feature_api_id"` // Feature的API标识
FeatureName string `json:"feature_name"` // Feature的名称
WhitelistPrice float64 `json:"whitelist_price"` // 屏蔽价格(单位:元)
}
CreateWhitelistOrderReq {
IdCard string `json:"id_card"` // 身份证号(查询对象标识)
FeatureIds []string `json:"feature_ids"` // 要屏蔽的feature ID列表
OrderId string `json:"order_id,optional"` // 关联的查询订单ID可选
}
CreateWhitelistOrderResp {
OrderId string `json:"order_id"` // 订单ID
OrderNo string `json:"order_no"` // 订单号
TotalAmount float64 `json:"total_amount"` // 总金额
}
GetWhitelistListReq {
Page int64 `form:"page"` // 页码
PageSize int64 `form:"page_size"` // 每页数量
IdCard string `form:"id_card,optional"` // 身份证号(可选,用于筛选)
}
GetWhitelistListResp {
Total int64 `json:"total"` // 总数
List []WhitelistItem `json:"list"` // 列表
}
WhitelistItem {
Id string `json:"id"` // 白名单记录ID
IdCard string `json:"id_card"` // 身份证号
FeatureId string `json:"feature_id"` // Feature的UUID
FeatureApiId string `json:"feature_api_id"` // Feature的API标识
FeatureName string `json:"feature_name"` // Feature的名称
Amount float64 `json:"amount"` // 费用
Status int64 `json:"status"` // 状态1=生效2=已失效
StatusText string `json:"status_text"` // 状态文本
CreateTime string `json:"create_time"` // 创建时间
}
CheckFeatureWhitelistStatusReq {
IdCard string `form:"id_card"` // 身份证号
FeatureApiId string `form:"feature_api_id"` // Feature的API标识
QueryId string `form:"query_id,optional"` // 查询记录ID可选
}
CheckFeatureWhitelistStatusResp {
IsWhitelisted bool `json:"is_whitelisted"` // 是否在白名单中
WhitelistPrice float64 `json:"whitelist_price"` // 屏蔽价格单位0表示不支持下架
FeatureId string `json:"feature_id"` // Feature的UUID
DataDeleted bool `json:"data_deleted"` // 报告数据是否已删除
}
OfflineFeatureReq {
FeatureApiId string `json:"feature_api_id"` // Feature的API标识
QueryId string `json:"query_id"` // 查询记录IDQuery表的ID必选
}
OfflineFeatureResp {
Success bool `json:"success"` // 是否已完成下架
NeedPay bool `json:"need_pay"` // 是否需要发起支付
Amount float64 `json:"amount"` // 需要支付的金额0表示无需支付
}
CheckOrderAgentReq {
OrderId string `form:"order_id"` // 订单ID
}
CheckOrderAgentResp {
IsAgentOrder bool `json:"is_agent_order"` // 是否是当前代理推广的订单
}
)