2024-11-21 12:14:34 +08:00
|
|
|
syntax = "v1"
|
|
|
|
|
|
|
|
info (
|
|
|
|
title: "产品查询服务"
|
|
|
|
desc: "产品查询服务"
|
|
|
|
author: "Liangzai"
|
|
|
|
email: "2440983361@qq.com"
|
|
|
|
)
|
|
|
|
|
|
|
|
type (
|
|
|
|
QueryReq {
|
|
|
|
Data string `json:"data" validate:"required"`
|
|
|
|
}
|
|
|
|
QueryResp {
|
2024-11-23 16:13:23 +08:00
|
|
|
id string `json:"id"`
|
2024-11-21 12:14:34 +08:00
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2024-12-24 11:37:25 +08:00
|
|
|
type (
|
|
|
|
QueryServiceReq {
|
|
|
|
Product string `path:"product"`
|
|
|
|
Data string `json:"data" validate:"required"`
|
|
|
|
}
|
|
|
|
QueryServiceResp {
|
|
|
|
id string `json:"id"`
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2024-11-21 12:14:34 +08:00
|
|
|
type Query {
|
2024-12-24 11:37:25 +08:00
|
|
|
Id int64 `json:"id"` // 主键ID
|
|
|
|
OrderId int64 `json:"order_id"` // 订单ID
|
|
|
|
UserId int64 `json:"user_id"` // 用户ID
|
|
|
|
ProductName string `json:"product_name"` // 产品ID
|
2024-12-28 02:21:47 +08:00
|
|
|
QueryParams map[string]interface{} `json:"query_params"`
|
2025-04-23 17:48:38 +08:00
|
|
|
QueryData []QueryItem `json:"query_data"`
|
2024-12-24 11:37:25 +08:00
|
|
|
CreateTime string `json:"create_time"` // 创建时间
|
|
|
|
UpdateTime string `json:"update_time"` // 更新时间
|
|
|
|
QueryState string `json:"query_state"` // 查询状态
|
2024-11-21 12:14:34 +08:00
|
|
|
}
|
2025-04-23 17:48:38 +08:00
|
|
|
type QueryItem {
|
|
|
|
Feature interface{} `json:"feature"`
|
|
|
|
Data interface{} `json:"data"` // 这里可以是 map 或 具体的 struct
|
|
|
|
}
|
2024-11-23 16:13:23 +08:00
|
|
|
// 获取查询临时订单
|
|
|
|
type (
|
|
|
|
QueryProvisionalOrderReq {
|
|
|
|
Id string `path:"id"`
|
|
|
|
}
|
|
|
|
QueryProvisionalOrderResp {
|
2025-01-18 22:34:27 +08:00
|
|
|
QueryParams map[string]interface{} `json:"query_params"`
|
2024-11-23 16:13:23 +08:00
|
|
|
Product Product `json:"product"`
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2024-11-21 12:14:34 +08:00
|
|
|
type (
|
|
|
|
QueryListReq {
|
|
|
|
Page int64 `form:"page"` // 页码
|
|
|
|
PageSize int64 `form:"page_size"` // 每页数据量
|
|
|
|
}
|
|
|
|
QueryListResp {
|
|
|
|
Total int64 `json:"total"` // 总记录数
|
|
|
|
List []Query `json:"list"` // 查询列表
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
type (
|
|
|
|
QueryExampleReq {
|
|
|
|
feature string `form:"feature"`
|
|
|
|
}
|
|
|
|
QueryExampleResp {
|
|
|
|
Query
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
type (
|
|
|
|
QueryDetailReq {
|
|
|
|
Id int64 `path:"id"`
|
|
|
|
}
|
|
|
|
QueryDetailResp {
|
|
|
|
Query
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
type (
|
|
|
|
QueryDetailByOrderIdReq {
|
|
|
|
OrderId int64 `path:"order_id"`
|
|
|
|
}
|
|
|
|
QueryDetailByOrderIdResp {
|
|
|
|
Query
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2024-12-24 11:37:25 +08:00
|
|
|
type (
|
|
|
|
QueryDetailByOrderNoReq {
|
|
|
|
OrderNo string `path:"order_no"`
|
|
|
|
}
|
|
|
|
QueryDetailByOrderNoResp {
|
|
|
|
Query
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2024-11-21 12:14:34 +08:00
|
|
|
type (
|
|
|
|
QueryRetryReq {
|
|
|
|
Id int64 `path:"id"`
|
|
|
|
}
|
|
|
|
QueryRetryResp {}
|
|
|
|
)
|
|
|
|
|
2025-03-16 00:36:13 +08:00
|
|
|
type QuerySingleTestReq {
|
|
|
|
params map[string]interface{} `json:"params"`
|
|
|
|
Api string `json:"api"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type QuerySingleTestResp {
|
|
|
|
Data interface{} `json:"data"`
|
|
|
|
Api string `json:"api"`
|
|
|
|
}
|
|
|
|
|
2025-04-16 19:43:46 +08:00
|
|
|
type (
|
|
|
|
UpdateQueryDataReq {
|
|
|
|
Id int64 `json:"id"` // 查询ID
|
|
|
|
QueryData string `json:"query_data"` // 查询数据(未加密的JSON)
|
|
|
|
}
|
|
|
|
UpdateQueryDataResp {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
UpdatedAt string `json:"updated_at"` // 更新时间
|
|
|
|
}
|
|
|
|
)
|