1 Star 0 Fork 0

taadis / aikucun-sdk-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
order_list_no.go 2.11 KB
一键复制 编辑 原始数据 按行查看 历史
taadis 提交于 2020-09-13 23:09 . implement Stringer interface
package aikucun
import (
"bytes"
"encoding/json"
"net/http"
)
// OrderListNoRequest
type OrderListNoRequest struct {
ActivityId string `json:"activityid"`
Page int `json:"page"`
PageSize int `json:"pagesize"`
FilterDeliver int `json:"filterDeliver"`
}
// OrderListNoResponse
type OrderListNoResponse struct {
BaseResponse
Data OrderListNoData `json:"data"`
}
// OrderListNoData
type OrderListNoData struct {
TotalRecord int `json:"totalrecord"`
TotalPage int `json:"totalpage"`
Page int `json:"page"`
PageSize int `json:"pagesize"`
Source string `json:"source"`
ActivityId string `json:"activityid"`
List []OrderListNoItem `json:"list"`
}
// OrderListNoItem
type OrderListNoItem struct {
AdorderId string `json:"adorderid"`
RealSettlementpriceAmount int `json:"realSettlementpriceAmount"`
Count int `json:"count"`
OrderStatus int `json:"orderstatus"`
LogisticsStatus int `json:"logisticsstatus"`
OrderTime string `json:"ordertime"`
PayTime string `json:"paytime"`
}
// Method
func (req *OrderListNoRequest) Method() string {
return http.MethodGet
}
// Path
func (req *OrderListNoRequest) Path() string {
return "/api/v2/order/listno"
}
// Params
func (req *OrderListNoRequest) Params() map[string]interface{} {
m := make(map[string]interface{})
m["activityid"] = req.ActivityId
m["page"] = req.Page
m["pagesize"] = req.PageSize
m["filterDeliver"] = req.FilterDeliver
return m
}
// NewOrderListNoRequest
func NewOrderListNoRequest() *OrderListNoRequest {
return new(OrderListNoRequest)
}
// String
func (resp *OrderListNoResponse) String() string {
buf := bytes.NewBuffer(nil)
err := json.NewEncoder(buf).Encode(resp)
if err != nil {
panic(err)
}
return buf.String()
}
// OrderListNo
func (client *Client) OrderListNo(request *OrderListNoRequest) (response *OrderListNoResponse, err error) {
response = &OrderListNoResponse{}
err = client.Do(request, response)
return
}
Go
1
https://gitee.com/taadis/aikucun-sdk-go.git
git@gitee.com:taadis/aikucun-sdk-go.git
taadis
aikucun-sdk-go
aikucun-sdk-go
master

搜索帮助