This commit is contained in:
2025-10-24 15:39:20 +08:00
parent c72d0a7aa6
commit a258c360c2
28 changed files with 1335 additions and 351 deletions

View File

@@ -7,8 +7,8 @@ info (
)
@server (
prefix: api/v1/admin/order
group: admin_order
prefix: api/v1/admin/order
group: admin_order
middleware: AdminAuthInterceptor
)
service main {
@@ -35,133 +35,139 @@ service main {
@doc "订单退款"
@handler AdminRefundOrder
post /refund/:id (AdminRefundOrderReq) returns (AdminRefundOrderResp)
@doc "重新执行代理处理"
@handler AdminRetryAgentProcess
post /retry-agent-process/:id (AdminRetryAgentProcessReq) returns (AdminRetryAgentProcessResp)
}
type (
// 列表请求
AdminGetOrderListReq {
Page int64 `form:"page,default=1"` // 页码
PageSize int64 `form:"pageSize,default=20"` // 每页数量
OrderNo string `form:"order_no,optional"` // 商户订单号
PlatformOrderId string `form:"platform_order_id,optional"` // 支付订单号
ProductName string `form:"product_name,optional"` // 产品名称
PaymentPlatform string `form:"payment_platform,optional"` // 支付方式
PaymentScene string `form:"payment_scene,optional"` // 支付平台
Amount float64 `form:"amount,optional"` // 金额
Status string `form:"status,optional"` // 支付状态pending-待支付paid-已支付refunded-已退款closed-已关闭failed-支付失败
Page int64 `form:"page,default=1"` // 页码
PageSize int64 `form:"pageSize,default=20"` // 每页数量
OrderNo string `form:"order_no,optional"` // 商户订单号
PlatformOrderId string `form:"platform_order_id,optional"` // 支付订单号
ProductName string `form:"product_name,optional"` // 产品名称
PaymentPlatform string `form:"payment_platform,optional"` // 支付方式
PaymentScene string `form:"payment_scene,optional"` // 支付平台
Amount float64 `form:"amount,optional"` // 金额
Status string `form:"status,optional"` // 支付状态pending-待支付paid-已支付refunded-已退款closed-已关闭failed-支付失败
IsPromotion int64 `form:"is_promotion,optional,default=-1"` // 是否推广订单0-否1-是
CreateTimeStart string `form:"create_time_start,optional"` // 创建时间开始
CreateTimeEnd string `form:"create_time_end,optional"` // 创建时间结束
PayTimeStart string `form:"pay_time_start,optional"` // 支付时间开始
PayTimeEnd string `form:"pay_time_end,optional"` // 支付时间结束
RefundTimeStart string `form:"refund_time_start,optional"` // 退款时间开始
RefundTimeEnd string `form:"refund_time_end,optional"` // 退款时间结束
CreateTimeStart string `form:"create_time_start,optional"` // 创建时间开始
CreateTimeEnd string `form:"create_time_end,optional"` // 创建时间结束
PayTimeStart string `form:"pay_time_start,optional"` // 支付时间开始
PayTimeEnd string `form:"pay_time_end,optional"` // 支付时间结束
RefundTimeStart string `form:"refund_time_start,optional"` // 退款时间开始
RefundTimeEnd string `form:"refund_time_end,optional"` // 退款时间结束
}
// 列表响应
AdminGetOrderListResp {
Total int64 `json:"total"` // 总数
Items []OrderListItem `json:"items"` // 列表
}
// 列表项
OrderListItem {
Id int64 `json:"id"` // 订单ID
OrderNo string `json:"order_no"` // 商户订单号
PlatformOrderId string `json:"platform_order_id"` // 支付订单号
ProductName string `json:"product_name"` // 产品名称
PaymentPlatform string `json:"payment_platform"` // 支付方式
PaymentScene string `json:"payment_scene"` // 支付平台
Amount float64 `json:"amount"` // 金额
Status string `json:"status"` // 支付状态pending-待支付paid-已支付refunded-已退款closed-已关闭failed-支付失败
QueryState string `json:"query_state"` // 查询状态pending-待查询success-查询成功failed-查询失败 processing-查询中
CreateTime string `json:"create_time"` // 创建时间
PayTime string `json:"pay_time"` // 支付时间
RefundTime string `json:"refund_time"` // 退款时间
IsPromotion int64 `json:"is_promotion"` // 是否推广订单0-否1-是
Id int64 `json:"id"` // 订单ID
OrderNo string `json:"order_no"` // 商户订单号
PlatformOrderId string `json:"platform_order_id"` // 支付订单号
ProductName string `json:"product_name"` // 产品名称
PaymentPlatform string `json:"payment_platform"` // 支付方式
PaymentScene string `json:"payment_scene"` // 支付平台
Amount float64 `json:"amount"` // 金额
Status string `json:"status"` // 支付状态pending-待支付paid-已支付refunded-已退款closed-已关闭failed-支付失败
QueryState string `json:"query_state"` // 查询状态pending-待查询success-查询成功failed-查询失败 processing-查询中
CreateTime string `json:"create_time"` // 创建时间
PayTime string `json:"pay_time"` // 支付时间
RefundTime string `json:"refund_time"` // 退款时间
IsPromotion int64 `json:"is_promotion"` // 是否推广订单0-否1-是
IsAgentOrder bool `json:"is_agent_order"` // 是否是代理订单
AgentProcessStatus string `json:"agent_process_status"` // 代理事务处理状态not_agent-非代理订单success-处理成功failed-处理失败pending-待处理
}
// 详情请求
AdminGetOrderDetailReq {
Id int64 `path:"id"` // 订单ID
}
// 详情响应
AdminGetOrderDetailResp {
Id int64 `json:"id"` // 订单ID
OrderNo string `json:"order_no"` // 商户订单号
PlatformOrderId string `json:"platform_order_id"` // 支付订单号
ProductName string `json:"product_name"` // 产品名称
PaymentPlatform string `json:"payment_platform"` // 支付方式
PaymentScene string `json:"payment_scene"` // 支付平台
Amount float64 `json:"amount"` // 金额
Status string `json:"status"` // 支付状态pending-待支付paid-已支付refunded-已退款closed-已关闭failed-支付失败
QueryState string `json:"query_state"` // 查询状态pending-待查询success-查询成功failed-查询失败 processing-查询中
CreateTime string `json:"create_time"` // 创建时间
PayTime string `json:"pay_time"` // 支付时间
RefundTime string `json:"refund_time"` // 退款时间
IsPromotion int64 `json:"is_promotion"` // 是否推广订单0-否1-是
UpdateTime string `json:"update_time"` // 更新时间
Id int64 `json:"id"` // 订单ID
OrderNo string `json:"order_no"` // 商户订单号
PlatformOrderId string `json:"platform_order_id"` // 支付订单号
ProductName string `json:"product_name"` // 产品名称
PaymentPlatform string `json:"payment_platform"` // 支付方式
PaymentScene string `json:"payment_scene"` // 支付平台
Amount float64 `json:"amount"` // 金额
Status string `json:"status"` // 支付状态pending-待支付paid-已支付refunded-已退款closed-已关闭failed-支付失败
QueryState string `json:"query_state"` // 查询状态pending-待查询success-查询成功failed-查询失败 processing-查询中
CreateTime string `json:"create_time"` // 创建时间
PayTime string `json:"pay_time"` // 支付时间
RefundTime string `json:"refund_time"` // 退款时间
IsPromotion int64 `json:"is_promotion"` // 是否推广订单0-否1-是
UpdateTime string `json:"update_time"` // 更新时间
IsAgentOrder bool `json:"is_agent_order"` // 是否是代理订单
AgentProcessStatus string `json:"agent_process_status"` // 代理事务处理状态not_agent-非代理订单success-处理成功failed-处理失败pending-待处理
}
// 创建请求
AdminCreateOrderReq {
OrderNo string `json:"order_no"` // 商户订单号
PlatformOrderId string `json:"platform_order_id"` // 支付订单号
ProductName string `json:"product_name"` // 产品名称
PaymentPlatform string `json:"payment_platform"` // 支付方式
PaymentScene string `json:"payment_scene"` // 支付平台
Amount float64 `json:"amount"` // 金额
OrderNo string `json:"order_no"` // 商户订单号
PlatformOrderId string `json:"platform_order_id"` // 支付订单号
ProductName string `json:"product_name"` // 产品名称
PaymentPlatform string `json:"payment_platform"` // 支付方式
PaymentScene string `json:"payment_scene"` // 支付平台
Amount float64 `json:"amount"` // 金额
Status string `json:"status,default=pending"` // 支付状态pending-待支付paid-已支付refunded-已退款closed-已关闭failed-支付失败
IsPromotion int64 `json:"is_promotion,default=0"` // 是否推广订单0-否1-是
}
// 创建响应
AdminCreateOrderResp {
Id int64 `json:"id"` // 订单ID
}
// 更新请求
AdminUpdateOrderReq {
Id int64 `path:"id"` // 订单ID
OrderNo *string `json:"order_no,optional"` // 商户订单号
Id int64 `path:"id"` // 订单ID
OrderNo *string `json:"order_no,optional"` // 商户订单号
PlatformOrderId *string `json:"platform_order_id,optional"` // 支付订单号
ProductName *string `json:"product_name,optional"` // 产品名称
PaymentPlatform *string `json:"payment_platform,optional"` // 支付方式
PaymentScene *string `json:"payment_scene,optional"` // 支付平台
Amount *float64 `json:"amount,optional"` // 金额
Status *string `json:"status,optional"` // 支付状态pending-待支付paid-已支付refunded-已退款closed-已关闭failed-支付失败
PayTime *string `json:"pay_time,optional"` // 支付时间
RefundTime *string `json:"refund_time,optional"` // 退款时间
IsPromotion *int64 `json:"is_promotion,optional"` // 是否推广订单0-否1-是
ProductName *string `json:"product_name,optional"` // 产品名称
PaymentPlatform *string `json:"payment_platform,optional"` // 支付方式
PaymentScene *string `json:"payment_scene,optional"` // 支付平台
Amount *float64 `json:"amount,optional"` // 金额
Status *string `json:"status,optional"` // 支付状态pending-待支付paid-已支付refunded-已退款closed-已关闭failed-支付失败
PayTime *string `json:"pay_time,optional"` // 支付时间
RefundTime *string `json:"refund_time,optional"` // 退款时间
IsPromotion *int64 `json:"is_promotion,optional"` // 是否推广订单0-否1-是
}
// 更新响应
AdminUpdateOrderResp {
Success bool `json:"success"` // 是否成功
}
// 删除请求
AdminDeleteOrderReq {
Id int64 `path:"id"` // 订单ID
}
// 删除响应
AdminDeleteOrderResp {
Success bool `json:"success"` // 是否成功
}
// 退款请求
AdminRefundOrderReq {
Id int64 `path:"id"` // 订单ID
Id int64 `path:"id"` // 订单ID
RefundAmount float64 `json:"refund_amount"` // 退款金额
RefundReason string `json:"refund_reason"` // 退款原因
}
// 退款响应
AdminRefundOrderResp {
Status string `json:"status"` // 退款状态
Status string `json:"status"` // 退款状态
RefundNo string `json:"refund_no"` // 退款单号
Amount float64 `json:"amount"` // 退款金额
Amount float64 `json:"amount"` // 退款金额
}
// 重新执行代理处理请求
AdminRetryAgentProcessReq {
Id int64 `path:"id"` // 订单ID
}
// 重新执行代理处理响应
AdminRetryAgentProcessResp {
Status string `json:"status"` // 执行状态success-成功already_processed-已处理failed-失败
Message string `json:"message"` // 执行结果消息
ProcessedAt string `json:"processed_at"` // 处理时间
}
)

View File

@@ -5,6 +5,7 @@ info (
desc: "代理服务接口"
version: "v1"
)
@server (
prefix: api/v1/agent
group: agent
@@ -14,14 +15,42 @@ service main {
@handler GetAgentPromotionQrcode
get /promotion/qrcode (GetAgentPromotionQrcodeReq)
// 获取会员开通信息
@handler GetMembershipInfo
get /membership/info returns (GetMembershipInfoResp)
}
type (
GetAgentPromotionQrcodeReq{
GetAgentPromotionQrcodeReq {
QrcodeType string `form:"qrcode_type"`
QrcodeUrl string `form:"qrcode_url"`
QrcodeUrl string `form:"qrcode_url"`
}
// 会员配置信息
MembershipConfigInfo {
Id int64 `json:"id"` // 主键
LevelName string `json:"level_name"` // 会员级别名称
Price float64 `json:"price"` // 会员年费
ReportCommission float64 `json:"report_commission"` // 直推报告收益
LowerActivityReward float64 `json:"lower_activity_reward"` // 下级活跃奖励金额
NewActivityReward float64 `json:"new_activity_reward"` // 新增活跃奖励金额
LowerStandardCount int64 `json:"lower_standard_count"` // 活跃下级达标个数
NewLowerStandardCount int64 `json:"new_lower_standard_count"` // 新增活跃下级达标个数
LowerWithdrawRewardRatio float64 `json:"lower_withdraw_reward_ratio"` // 下级提现奖励比例
LowerConvertVipReward float64 `json:"lower_convert_vip_reward"` // 下级转化VIP奖励
LowerConvertSvipReward float64 `json:"lower_convert_svip_reward"` // 下级转化SVIP奖励
ExemptionAmount float64 `json:"exemption_amount"` // 免审核金额
PriceIncreaseMax float64 `json:"price_increase_max"` // 提价最高金额
PriceRatio float64 `json:"price_ratio"` // 提价区间收取比例
PriceIncreaseAmount float64 `json:"price_increase_amount"` // 在原本成本上加价的金额
}
// 获取会员开通信息响应
GetMembershipInfoResp {
NormalConfig MembershipConfigInfo `json:"normal_config"` // 普通代理配置
VipConfig MembershipConfigInfo `json:"vip_config"` // VIP会员配置
SvipConfig MembershipConfigInfo `json:"svip_config"` // SVIP会员配置
}
)
// 代理服务基本类型定义
type AgentProductConfig {
ProductID int64 `json:"product_id"`
@@ -49,6 +78,7 @@ type ProductConfig {
PriceRangeMin float64 `json:"price_range_min"`
PriceRangeMax float64 `json:"price_range_max"`
}
@server (
prefix: api/v1/agent
group: agent
@@ -62,10 +92,11 @@ service main {
@handler GetAgentRevenueInfo
get /revenue (GetAgentRevenueInfoReq) returns (GetAgentRevenueInfoResp)
}
@server (
prefix: api/v1/agent
group: agent
jwt: JwtAuth
prefix: api/v1/agent
group: agent
jwt: JwtAuth
middleware: UserAuthInterceptor
)
service main {
@@ -88,21 +119,21 @@ service main {
// 下级贡献详情
@handler GetAgentSubordinateContributionDetail
get /subordinate/contribution/detail (GetAgentSubordinateContributionDetailReq) returns (GetAgentSubordinateContributionDetailResp)
@handler AgentRealName
post /real_name (AgentRealNameReq) returns (AgentRealNameResp)
}
type (
AgentInfoResp {
status int64 `json:"status"` // 0=待审核1=审核通过2=审核未通过3=未申请
isAgent bool `json:"is_agent"`
agentID int64 `json:"agent_id"`
level string `json:"level"`
region string `json:"region"`
mobile string `json:"mobile"`
status int64 `json:"status"` // 0=待审核1=审核通过2=审核未通过3=未申请
isAgent bool `json:"is_agent"`
agentID int64 `json:"agent_id"`
level string `json:"level"`
region string `json:"region"`
mobile string `json:"mobile"`
expiryTime string `json:"expiry_time"`
isRealName bool `json:"is_real_name"`
isRealName bool `json:"is_real_name"`
}
// 查询代理申请状态响应
AgentAuditStatusResp {
@@ -124,64 +155,63 @@ type (
PageSize int64 `form:"page_size"` // 每页数据量
}
GetAgentSubordinateListResp {
Total int64 `json:"total"` // 总记录数
Total int64 `json:"total"` // 总记录数
List []AgentSubordinateList `json:"list"` // 查询列表
}
AgentSubordinateList {
ID int64 `json:"id"`
Mobile string `json:"mobile"`
CreateTime string `json:"create_time"`
LevelName string `json:"level_name"`
TotalOrders int64 `json:"total_orders"` // 总单量
TotalEarnings float64 `json:"total_earnings"` // 总金额
ID int64 `json:"id"`
Mobile string `json:"mobile"`
CreateTime string `json:"create_time"`
LevelName string `json:"level_name"`
TotalOrders int64 `json:"total_orders"` // 总单量
TotalEarnings float64 `json:"total_earnings"` // 总金额
TotalContribution float64 `json:"total_contribution"` // 总贡献
}
GetAgentSubordinateContributionDetailReq {
Page int64 `form:"page"` // 页码
PageSize int64 `form:"page_size"` // 每页数据量
Page int64 `form:"page"` // 页码
PageSize int64 `form:"page_size"` // 每页数据量
SubordinateID int64 `form:"subordinate_id"` // 下级ID
}
GetAgentSubordinateContributionDetailResp {
Mobile string `json:"mobile"`
Total int64 `json:"total"` // 总记录数
CreateTime string `json:"create_time"`
TotalEarnings float64 `json:"total_earnings"` // 总金额
TotalContribution float64 `json:"total_contribution"` // 总贡献
TotalOrders int64 `json:"total_orders"` // 总单量
LevelName string `json:"level_name"` // 等级名称
List []AgentSubordinateContributionDetail `json:"list"` // 查询列表
Stats AgentSubordinateContributionStats `json:"stats"` // 统计数据
Mobile string `json:"mobile"`
Total int64 `json:"total"` // 总记录数
CreateTime string `json:"create_time"`
TotalEarnings float64 `json:"total_earnings"` // 总金额
TotalContribution float64 `json:"total_contribution"` // 总贡献
TotalOrders int64 `json:"total_orders"` // 总单量
LevelName string `json:"level_name"` // 等级名称
List []AgentSubordinateContributionDetail `json:"list"` // 查询列表
Stats AgentSubordinateContributionStats `json:"stats"` // 统计数据
}
AgentSubordinateContributionDetail {
ID int64 `json:"id"`
CreateTime string `json:"create_time"`
Amount float64 `json:"amount"`
Type string `json:"type"`
CreateTime string `json:"create_time"`
Amount float64 `json:"amount"`
Type string `json:"type"`
}
AgentSubordinateContributionStats {
CostCount int64 `json:"cost_count"` // 成本扣除次数
CostAmount float64 `json:"cost_amount"` // 成本扣除总额
PricingCount int64 `json:"pricing_count"` // 定价扣除次数
PricingAmount float64 `json:"pricing_amount"` // 定价扣除总额
DescendantPromotionCount int64 `json:"descendant_promotion_count"` // 下级推广次数
DescendantPromotionAmount float64 `json:"descendant_promotion_amount"` // 下级推广总额
DescendantUpgradeVipCount int64 `json:"descendant_upgrade_vip_count"` // 下级升级VIP次数
DescendantUpgradeVipAmount float64 `json:"descendant_upgrade_vip_amount"` // 下级升级VIP总额
DescendantUpgradeSvipCount int64 `json:"descendant_upgrade_svip_count"` // 下级升级SVIP次数
CostCount int64 `json:"cost_count"` // 成本扣除次数
CostAmount float64 `json:"cost_amount"` // 成本扣除总额
PricingCount int64 `json:"pricing_count"` // 定价扣除次数
PricingAmount float64 `json:"pricing_amount"` // 定价扣除总额
DescendantPromotionCount int64 `json:"descendant_promotion_count"` // 下级推广次数
DescendantPromotionAmount float64 `json:"descendant_promotion_amount"` // 下级推广总额
DescendantUpgradeVipCount int64 `json:"descendant_upgrade_vip_count"` // 下级升级VIP次数
DescendantUpgradeVipAmount float64 `json:"descendant_upgrade_vip_amount"` // 下级升级VIP总额
DescendantUpgradeSvipCount int64 `json:"descendant_upgrade_svip_count"` // 下级升级SVIP次数
DescendantUpgradeSvipAmount float64 `json:"descendant_upgrade_svip_amount"` // 下级升级SVIP总额
DescendantStayActiveCount int64 `json:"descendant_stay_active_count"` // 下级保持活跃次数
DescendantStayActiveAmount float64 `json:"descendant_stay_active_amount"` // 下级保持活跃总额
DescendantNewActiveCount int64 `json:"descendant_new_active_count"` // 下级新增活跃次数
DescendantNewActiveAmount float64 `json:"descendant_new_active_amount"` // 下级新增活跃总额
DescendantWithdrawCount int64 `json:"descendant_withdraw_count"` // 下级提现次数
DescendantWithdrawAmount float64 `json:"descendant_withdraw_amount"` // 下级提现总额
DescendantStayActiveCount int64 `json:"descendant_stay_active_count"` // 下级保持活跃次数
DescendantStayActiveAmount float64 `json:"descendant_stay_active_amount"` // 下级保持活跃总额
DescendantNewActiveCount int64 `json:"descendant_new_active_count"` // 下级新增活跃次数
DescendantNewActiveAmount float64 `json:"descendant_new_active_amount"` // 下级新增活跃总额
DescendantWithdrawCount int64 `json:"descendant_withdraw_count"` // 下级提现次数
DescendantWithdrawAmount float64 `json:"descendant_withdraw_amount"` // 下级提现总额
}
AgentRealNameReq {
Name string `json:"name"`
Name string `json:"name"`
IDCard string `json:"id_card"`
Mobile string `json:"mobile"`
Code string `json:"code"`
Code string `json:"code"`
}
AgentRealNameResp {
Status string `json:"status"`
@@ -189,11 +219,10 @@ type (
)
@server (
prefix: api/v1/agent
group: agent
jwt: JwtAuth
prefix: api/v1/agent
group: agent
jwt: JwtAuth
middleware: UserAuthInterceptor
)
service main {
@handler GetAgentMembershipProductConfig
@@ -226,11 +255,10 @@ type (
)
@server (
prefix: api/v1/agent
group: agent
jwt: JwtAuth
prefix: api/v1/agent
group: agent
jwt: JwtAuth
middleware: UserAuthInterceptor
)
service main {
@handler GetAgentCommission
@@ -340,17 +368,15 @@ type (
Status int64 `json:"status"` // 1申请中 2成功 3失败
failMsg string `json:"fail_msg"`
}
// 开通代理会员请求参数
AgentActivateMembershipReq {
Type string `json:"type,oneof=VIP SVIP"` // 会员类型vip/svip
Type string `json:"type,oneof=VIP SVIP"` // 会员类型vip/svip
}
// 开通代理会员响应
AgentActivateMembershipResp {
Id string `json:"id"`
}
GetWithdrawalTaxExemptionReq {
Id string `json:"id"`
}
GetWithdrawalTaxExemptionReq {}
GetWithdrawalTaxExemptionResp {
TotalExemptionAmount float64 `json:"total_exemption_amount"`
UsedExemptionAmount float64 `json:"used_exemption_amount"`
@@ -360,10 +386,9 @@ type (
)
@server (
prefix: api/v1/agent
group: agent
prefix: api/v1/agent
group: agent
middleware: AuthInterceptor
)
service main {
// 提交代理申请
@@ -373,7 +398,6 @@ service main {
// 获取推广标识数据
@handler GetLinkData
get /link (GetLinkDataReq) returns (GetLinkDataResp)
}
type (
@@ -384,7 +408,7 @@ type (
Code string `json:"code"`
Ancestor string `json:"ancestor,optional"`
}
AgentApplyResp{
AgentApplyResp {
AccessToken string `json:"accessToken"`
AccessExpire int64 `json:"accessExpire"`
RefreshAfter int64 `json:"refreshAfter"`

View File

@@ -9,9 +9,10 @@ info (
//============================> query v1 <============================
// 查询基本类型定义
type Query {
Id int64 `json:"id"` // 主键ID
OrderId int64 `json:"order_id"` // 订单ID
UserId int64 `json:"user_id"` // 用户ID
Id int64 `json:"id"` // 主键ID
OrderId int64 `json:"order_id"` // 订单ID
UserId int64 `json:"user_id"` // 用户ID
Product string `json:"product"` // 产品ID
ProductName string `json:"product_name"` // 产品ID
QueryParams map[string]interface{} `json:"query_params"`
QueryData []QueryItem `json:"query_data"`
@@ -20,15 +21,14 @@ type Query {
QueryState string `json:"query_state"` // 查询状态
}
type QueryItem {
Feature interface{} `json:"feature"`
Data interface{} `json:"data"` // 这里可以是 map 或 具体的 struct
}
@server (
prefix: api/v1
group: query
prefix: api/v1
group: query
middleware: AuthInterceptor
)
service main {
@@ -65,11 +65,10 @@ type (
)
@server (
prefix: api/v1
group: query
jwt: JwtAuth
prefix: api/v1
group: query
jwt: JwtAuth
middleware: UserAuthInterceptor
)
service main {
@doc "query service"
@@ -78,11 +77,10 @@ service main {
}
@server (
prefix: api/v1
group: query
jwt: JwtAuth
prefix: api/v1
group: query
jwt: JwtAuth
middleware: UserAuthInterceptor
)
service main {
@doc "获取查询临时订单"
@@ -116,7 +114,7 @@ service main {
type (
QueryGenerateShareLinkReq {
OrderId *int64 `json:"order_id,optional"`
OrderId *int64 `json:"order_id,optional"`
OrderNo *string `json:"order_no,optional"`
}
QueryGenerateShareLinkResp {
@@ -139,12 +137,12 @@ type (
type (
QueryListReq {
Page int64 `form:"page"` // 页码
Page int64 `form:"page"` // 页码
PageSize int64 `form:"page_size"` // 每页数据量
}
QueryListResp {
Total int64 `json:"total"` // 总记录数
List []Query `json:"list"` // 查询列表
List []Query `json:"list"` // 查询列表
}
)
@@ -157,7 +155,6 @@ type (
}
)
type (
QueryDetailByOrderIdReq {
OrderId int64 `path:"order_id"`
@@ -185,10 +182,9 @@ type (
}
)
type (
UpdateQueryDataReq {
Id int64 `json:"id"` // 查询ID
Id int64 `json:"id"` // 查询ID
QueryData string `json:"query_data"` // 查询数据(未加密的JSON)
}
UpdateQueryDataResp {
@@ -212,8 +208,8 @@ service main {
@doc "查询示例"
@handler queryExample
get /query/example (QueryExampleReq) returns (QueryExampleResp)
}
type (
QueryShareDetailReq {
Id string `path:"id"`