129 lines
5.7 KiB
Go
129 lines
5.7 KiB
Go
package main
|
||
|
||
//func main() {
|
||
// // fields, err := outGetTplFields("2aaf1b863a530d4dc0a41539292587f5b35e05da", "", "9811034490")
|
||
// // if err != nil {
|
||
// // fmt.Println(err)
|
||
// // }
|
||
// // marshal, _ := json.Marshal(fields)
|
||
// // fmt.Println("数据:", string(marshal))
|
||
// // formData := `{"author":"朱自清、逯亮 著","bearShipping":"buyer","binding":"2","booklibId":"","catId":"32002004001000000","deliverTimeGroup":"1","images[0][imgDesc]":"","images[0][imgType]":"0","images[0][imgUrl]":"sw/kfz-cos/kfzimg/24175337/7174f9932b38d071_s.jpg","images[0][isMain]":"1","images[1][imgDesc]":"","images[1][imgType]":"0","images[1][imgUrl]":"sw/kfz-cos/kfzimg/24175337/271a68c88dad67f4_s.jpg","images[1][isMain]":"0","importantDesc":"","isDeliverTimeDefault":"48h","isOnSale":"1","isbn":"9787204155293","itemDesc":"","itemId":"9890668175","itemName":"朱自清散文集/新课标课外阅读经典文学名著","itemSn":"24-9","language":"","material":"","mouldId":"975623","number":"3","oriPrice":"0.01","pageNum":"169","pageSize":"16开","pageType":"edit","paper":"6","press":"内蒙古人民出版社","price":"759.00","pubDate":"2018-10","quality":"95","qualityDesc":"","sizeHeight":"0.00","sizeLength":"0.00","sizeWidth":"0.00","tpl":"13","weight":"1.00","weightPiece":"0.00","wordNum":"230","yearsGroup":"1"}
|
||
// //`
|
||
// // goods, err := outUpdateGoods("ea9f46cd9b1c8a93f143993a363b08a835640080", "", formData)
|
||
// // if err != nil {
|
||
// // fmt.Println(err.Error())
|
||
// // }
|
||
// // marshal, _ := json.Marshal(goods)
|
||
// // fmt.Println(string(marshal))
|
||
//
|
||
// info, err := outUpdateGoodsPrice("ea9f46cd9b1c8a93f143993a363b08a835640080", "", "9890668175", "price", "859.00")
|
||
// if err != nil {
|
||
// fmt.Println(err.Error())
|
||
// }
|
||
// var apiResponse APIResponse
|
||
// if err != nil {
|
||
// apiResponse = APIResponse{
|
||
// Success: false,
|
||
// Message: err.Error(),
|
||
// }
|
||
// } else {
|
||
// apiResponse = APIResponse{
|
||
// Success: true,
|
||
// Data: info["result"],
|
||
// }
|
||
// }
|
||
// marshal, _ := json.Marshal(apiResponse)
|
||
// fmt.Println(string(marshal))
|
||
|
||
//goods, err := outGetAllGoods("1acf1d5ce6f99fde2ae31f093e4201f9c9004e3f", "", 3, "", "100", "三国演义", "罗贯中", "中国画报出版社")
|
||
//if err != nil {
|
||
//fmt.Println(err)
|
||
//}
|
||
//marshal, _ := json.Marshal(goods)
|
||
//fmt.Println(string(marshal))
|
||
//}
|
||
|
||
type ItemInfo struct {
|
||
ItemName string `json:"itemName"`
|
||
ISBN string `json:"isbn"`
|
||
Author string `json:"author"`
|
||
Press string `json:"press"`
|
||
YearsGroup string `json:"yearsGroup"`
|
||
PubDate string `json:"pubDate"`
|
||
PubDateYear string `json:"pubDateYear"`
|
||
PubDateMonth string `json:"pubDateMonth"`
|
||
Edition string `json:"edition"`
|
||
Binding string `json:"binding"`
|
||
Quality string `json:"quality"`
|
||
Price string `json:"price"`
|
||
Number string `json:"number"`
|
||
ItemSn string `json:"itemSn"`
|
||
Images []ImageInfo `json:"images"`
|
||
MouldId string `json:"mouldId"`
|
||
DeliverTime string `json:"deliverTime"`
|
||
IsDeliverTimeDefault string `json:"isDeliverTimeDefault"`
|
||
CatId string `json:"catId"`
|
||
PageType string `json:"pageType"`
|
||
OldCatId string `json:"oldCatId"`
|
||
Tpl string `json:"tpl"`
|
||
BearShipping string `json:"bearShipping"`
|
||
WeightPiece string `json:"weightPiece"`
|
||
IsOnSale string `json:"isOnSale"`
|
||
Weight string `json:"weight"`
|
||
IsUseMould string `json:"isUseMould"`
|
||
DeliverTimeGroup string `json:"deliverTimeGroup"`
|
||
}
|
||
|
||
type ImageInfo struct {
|
||
ImgUrl string `json:"imgUrl"`
|
||
IsMain int `json:"isMain"`
|
||
}
|
||
|
||
// OrderQueryParams 订单查询参数结构体
|
||
type OrderQueryParams struct {
|
||
// UserType 用户类型。取值 seller: 卖家;buyer: 买家。
|
||
UserType string `json:"userType" binding:"required"`
|
||
|
||
// OrderStatus 订单状态。默认为全部订单。
|
||
// Trading:交易中;
|
||
// Pending:待确认;
|
||
// ConfirmedToPay:待付款;
|
||
// PaidToShip:待发货;
|
||
// ShippedToReceipt:待确认收货;
|
||
// Refund:退货退款中;
|
||
// sellerReviewed:待评价;
|
||
// Successful:成功完成;
|
||
// RefundDeald:已退货退款;
|
||
// BuyerCancelled:买家取消;
|
||
// SellerCancelledBeforeConfirm:卖家取消;
|
||
// AdminClosedBeforeConfirm:管理员关闭。
|
||
OrderStatus string `json:"orderStatus,omitempty"`
|
||
|
||
// PageNum 页码。默认为:1
|
||
PageNum int `json:"pageNum,omitempty"`
|
||
|
||
// PageSize 每页最大条数。默认为:20,最大值为:100
|
||
PageSize int `json:"pageSize,omitempty"`
|
||
|
||
// IsDelete 是否已删除。默认查询未删除的
|
||
IsDelete int `json:"isDelete,omitempty"`
|
||
|
||
// StartDate 根据订单生成时间查询的起始日期,格式为yyyy-mm-dd,时区为GMT+8
|
||
StartDate string `json:"startDate,omitempty"`
|
||
|
||
// EndDate 根据订单生成时间查询的截止日期,格式为yyyy-mm-dd,时区为GMT+8
|
||
EndDate string `json:"endDate,omitempty"`
|
||
|
||
// StartTime 根据订单生成时间查询的起始时间,格式为yyyy-mm-dd hh:mm:ss,时区为GMT+8
|
||
StartTime string `json:"startTime,omitempty"`
|
||
|
||
// EndTime 根据订单生成时间查询的截止时间,格式为yyyy-mm-dd hh:mm:ss,时区为GMT+8
|
||
EndTime string `json:"endTime,omitempty"`
|
||
|
||
// StartUpdateTime 根据订单更新时间查询的起始时间,格式为yyyy-mm-dd hh:mm:ss,时区为GMT+8
|
||
StartUpdateTime string `json:"startUpdateTime,omitempty"`
|
||
|
||
// EndUpdateTime 根据订单更新时间查询的截止时间,格式为yyyy-mm-dd hh:mm:ss,时区为GMT+8
|
||
EndUpdateTime string `json:"endUpdateTime,omitempty"`
|
||
}
|