Files
baseapi/platformapi/gome_live_show/order_model.go

204 lines
9.6 KiB
Go

package gome_live_show
import "time"
//#region 根据创建时间查询订单的列表信息
// 查询半小时内的订单,
type QueryOrderListForTimeReq struct {
StartTime time.Time `json:"startTime"` // 订单创建起始时间,默认只查询当天订单
EndTime time.Time `json:"endTime"` // 订单创建时间截止,默认只查询当天订单
StoreCode string `json:"storeCode"` // 过滤店铺信息,不传递是所有
OrderNo string `json:"orderNo"` // 过滤订单号
Status string `json:"status"` // 订单状态枚举值,不传递是所有
Page
}
// 返回参数
type QueryOrderListForTimeRes struct {
SystemParameterRes
Data *QueryOrderListForTimeData
}
type QueryOrderListForTimeData struct {
Record []*QueryOrderListForTimeRecord
SystemRecordDataDetailRes
}
type QueryOrderListForTimeRecord struct {
StoreCode string `json:"storeCode"`
StoreName string `json:"storeName"`
OrderNo string `json:"orderNo"`
UserName string `json:"userName"` // 下单用户名
Mobile string `json:"mobile"` // 下单用户电话
Items []*Items `json:"items"` // 商品
TotalAmount float64 `json:"totalAmount"` // 订单总价
RealAmount float64 `json:"realAmount"` // 用户实付金额
CreateTime string `json:"createTime"` // 下单时间
Status string `json:"status"` // 订单状态
UserCancelState string `json:"userCancelState"` // 订单取消审核 NONE-未申请ON-申请中PASS-申请通过REJECT-申请被拒绝
}
type Items struct {
SpuCode string `json:"spuCode"` // 平台 spu 编码
SkuCode string `json:"skuCode"` // 平台 sku 编码
ThirdSkuCode string `json:"thirdSkuCode"` // 外部 sku 编码
GoodsName string `json:"goodsName"` // 商品名称
Quantity int `json:"quantity"` // 购买商品数量
Amount float64 `json:"amount"` // 商品总价
}
//#endregion
//#region 查询订单详情接口
type QueryOrderDetailRes struct {
SystemParameterRes
Data *QueryOrderListForTimeData
}
type QueryOrderDetailResData struct {
Record *QueryOrderDetailRecordReq
SystemRecordDataDetailRes
}
type QueryOrderDetailRecordReq struct {
StoreCode string `json:"storeCode"` // 店铺码
OrderNo string `json:"orderNo"` // 订单号
OrderType string `json:"orderType"` // 订单类型
OrderPayType string `json:"orderPayType"` // 订单付款方式
Mobile string `json:"mobile"` // 用户手机号码
UserName string `json:"userName"` // 用户名
Items []*GoodsItems `json:"items"` // 商品列表
TotalAmount float64 `json:"totalAmount"` // 商品订单总价
RealAmount float64 `json:"realAmount"` // 商品实付金额
Quantity int `json:"quantity"` // 订单下单数量
CreateTime string `json:"createTime"` // 下单时间
Status string `json:"status"` // 订单状态
Comment string `json:"comment"` // 用户下单备注
CancelInfo *CancelInfo `json:"cancelInfo"` // 订单取消信息集
DeliveryInfo *DeliveryInfo `json:"deliveryInfo"` // 配送信息集
ExpressInfo *ExpressInfo `json:"expressInfo"` // 物流信息集
}
type GoodsItems struct {
SkuCode string `json:"skuCode"` // 平台 sku 编码
SpuCode string `json:"spuCode"` // 平台 spu 编码
ThirdSkuCode string `json:"thirdSkuCode"` // 外部 sku 编码
MainPictureURL string `json:"mainPictureUrl"` // 商品主图
FullSpecName string `json:"fullSpecName"` // 商品规格名称
FullCatName string `json:"fullCatName"` // 商品所属品类
Quantity int `json:"quantity"` // 购买商品数量
SalePrice float64 `json:"salePrice"` // 商品售价
SkuRealAmount float64 `json:"skuRealAmount"` // 商品项实付金额
FinishAfterNumber int `json:"finishAfterNumber"` // 已申请售后数量
AftersaleEndTime string `json:"aftersaleEndTime"` // 售后截止时间
GoodsName string `json:"goodsName"` // 商品名称
Cat1Code string `json:"cat1Code"`
Cat2Code string `json:"cat2Code"`
Cat3Code string `json:"cat3Code"`
SpuName string `json:"spuName"`
OrderItemNo string `json:"orderItemNo"`
SkuName string `json:"skuName"`
}
type CancelInfo struct {
UserCancelApplyTime string `json:"userCancelApplyTime"` // 用户申请取消时间
UserCancelReasonStr string `json:"userCancelReasonStr"` // 用户申请取消原因
UserCancelState string `json:"userCancelState"` // 订单取消审核状态
MerchantCancelReason string `json:"merchantCancelReason"` // 商家取消原因Id
MerchantCancelReasonStr string `json:"merchantCancelReasonStr"` // 商家取消原因
}
type DeliveryInfo struct {
DeliveryOrderNo string `json:"deliveryOrderNo"` // 配送单号
ReceiverName string `json:"receiverName"` // 收货人姓名
ReceiverMobile string `json:"receiverMobile"` // 收货人手机号
ReceiverAddress string `json:"receiverAddress"` // 地址包含省市
ProvinceCode string `json:"provinceCode"` // 省编码
ProvinceName string `json:"provinceName"` // 省名称
CityCode string `json:"cityCode"` // 市编码
CityName string `json:"cityName"` // 市名称
DistrictCode string `json:"districtCode"` // 区编码
DistrictName string `json:"districtName"` // 区名称
DeliveryAdress string `json:"deliveryAdress"` // 详细地址
DeliveryAmount float64 `json:"deliveryAmount"` // 运费金额
}
type ExpressInfo struct {
ExpressName string `json:"expressName"` // 物流单号
ExpressNo string `json:"expressNo"` // 物流公司名称
ExpressCode string `json:"expressCode"` // 物流公司标准编码
}
//#endregion
//#region 此接口主要用于商户基于订单发货场景,第三方平台调用成功后,订单状态将变为待收货
type DeliveryOrderReq struct {
OrderNo string `json:"orderNo"` // 订单号[必填]
storeCode string `json:"storeCode"` // 平台店铺编码[必填]
ExpressList []*struct { // 订单发货物流集合[必填]
ExpressNo string `json:"expressNo"` // 物流单号[必填]
ExpressCode string `json:"expressCode"` // 物流公司编码[必填]
ExpressName string `json:"expressName"` // 物流公司物流公司[必填]
}
}
//#endregion
//#region 商户审核用户取消订单申请
type AgreeOrRefuseCheck struct {
OrderNo string `json:"orderNo"` // 订单号[必填]
StoreCode string `json:"storeCode"` // 店铺码[必填]
CancelApplyResult int `json:"cancelApplyResult"` // 审核结果 商户审核结果1 同意2拒绝[必填]
CancelApplyRejectReason string `json:"cancelApplyRejectReason"` // 商户审核用户取消拒绝原因
}
//#endregion
//#region 获取售后单详情
type QueryAfterSaleOrderDetailRes struct {
SystemParameterRes
Data *QueryAfterSaleOrderDetailDataRes
}
type QueryAfterSaleOrderDetailDataRes struct {
SystemRecordDataDetailRes
Records *QueryAfterSaleOrderDetailRecordsRes
}
type QueryAfterSaleOrderDetailRecordsRes struct {
AfterSaleNo string `json:"afterSaleNo"` // 售后单单号
StoreCode string `json:"storeCode"` // 平台店铺编码
StoreName string `json:"storeName"` // 平台店铺名称
OrderNo string `json:"orderNo"` // 订单号
AfterSaleType int `json:"afterSaleType"` // 售后类型
RefundReasonCode string `json:"refundReasonCode"` // 退款原因id
RefundReasonStr string `json:"refundReasonStr"` // 退款原因描述
CargoState int `json:"cargoState"` // 货物 状态
IssueDesc string `json:"issueDesc"` // 补充描述和凭证
SkuCode string `json:"skuCode"` // 平台 sku 编码
GoodsName string `json:"goodsName"` // 平台 sku 名称
AfterSaleNumber int `json:"afterSaleNumber"` // 申请售后 sku 数量
AfterSaleStatus int `json:"afterSaleStatus"` // 售后单状态
CreateTime time.Time `json:"createTime"` // 创建时间
ApproveDeadline time.Time `json:"approveDeadline"` // 商家审核截至时建间
AgreeApplyTime time.Time `json:"agreeApplyTime"` // 商家同意时间
AfterSaleRejectReason string `json:"afterSaleRejectReason"` // 商家拒绝理由
DeliverGoodsDeadline time.Time `json:"deliverGoodsDeadline"` // 用户发货截至时间
ConfirmGoodsDeadline time.Time `json:"confirmGoodsDeadline"` // 商家收货截至时 间
ExpectRefundAmount float64 `json:"expectRefundAmount"` // 预计退款金额
ReturnLogisticsNo string `json:"returnLogisticsNo"` // 用户退货快递单号
ReturnLogistics string `json:"returnLogistics"` // 用户退货快递公司
ReturnTime time.Time `json:"returnTime"` // 用户退货退货时间
}
//#endregion
//#region 上传图片
type GomeiUploadImgRes struct {
Code int64 `json:"code"` // 响应码
Timestamp int64 `json:"timestamp"` // 时间戳(秒)
Message string `json:"message"` // 响应描述
RequestId string `json:"requestId"` // 请求id
Data *struct {
Url string `json:"url"`
}
}
//#endregion