new
This commit is contained in:
128
app/main/api/desc/front/query/query.api
Normal file
128
app/main/api/desc/front/query/query.api
Normal file
@@ -0,0 +1,128 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: "产品查询服务"
|
||||
desc: "产品查询服务"
|
||||
author: "Liangzai"
|
||||
email: "2440983361@qq.com"
|
||||
)
|
||||
|
||||
type (
|
||||
QueryReq {
|
||||
Data string `json:"data" validate:"required"`
|
||||
}
|
||||
QueryResp {
|
||||
id string `json:"id"`
|
||||
}
|
||||
)
|
||||
|
||||
type (
|
||||
QueryServiceReq {
|
||||
Product string `path:"product"`
|
||||
Data string `json:"data" validate:"required"`
|
||||
}
|
||||
QueryServiceResp {
|
||||
id string `json:"id"`
|
||||
}
|
||||
)
|
||||
|
||||
type Query {
|
||||
Id int64 `json:"id"` // 主键ID
|
||||
OrderId int64 `json:"order_id"` // 订单ID
|
||||
UserId int64 `json:"user_id"` // 用户ID
|
||||
ProductName string `json:"product_name"` // 产品ID
|
||||
QueryParams map[string]interface{} `json:"query_params"`
|
||||
QueryData []QueryItem `json:"query_data"`
|
||||
CreateTime string `json:"create_time"` // 创建时间
|
||||
UpdateTime string `json:"update_time"` // 更新时间
|
||||
QueryState string `json:"query_state"` // 查询状态
|
||||
}
|
||||
type QueryItem {
|
||||
Feature interface{} `json:"feature"`
|
||||
Data interface{} `json:"data"` // 这里可以是 map 或 具体的 struct
|
||||
}
|
||||
// 获取查询临时订单
|
||||
type (
|
||||
QueryProvisionalOrderReq {
|
||||
Id string `path:"id"`
|
||||
}
|
||||
QueryProvisionalOrderResp {
|
||||
QueryParams map[string]interface{} `json:"query_params"`
|
||||
Product Product `json:"product"`
|
||||
}
|
||||
)
|
||||
|
||||
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
|
||||
}
|
||||
)
|
||||
|
||||
type (
|
||||
QueryDetailByOrderNoReq {
|
||||
OrderNo string `path:"order_no"`
|
||||
}
|
||||
QueryDetailByOrderNoResp {
|
||||
Query
|
||||
}
|
||||
)
|
||||
|
||||
type (
|
||||
QueryRetryReq {
|
||||
Id int64 `path:"id"`
|
||||
}
|
||||
QueryRetryResp {}
|
||||
)
|
||||
|
||||
type QuerySingleTestReq {
|
||||
params map[string]interface{} `json:"params"`
|
||||
Api string `json:"api"`
|
||||
}
|
||||
|
||||
type QuerySingleTestResp {
|
||||
Data interface{} `json:"data"`
|
||||
Api string `json:"api"`
|
||||
}
|
||||
|
||||
type (
|
||||
UpdateQueryDataReq {
|
||||
Id int64 `json:"id"` // 查询ID
|
||||
QueryData string `json:"query_data"` // 查询数据(未加密的JSON)
|
||||
}
|
||||
UpdateQueryDataResp {
|
||||
Id int64 `json:"id"`
|
||||
UpdatedAt string `json:"updated_at"` // 更新时间
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user