refactor:fix

master v1.0.7
大虾 4 years ago
parent cddb3ce7a0
commit b54cac2dff

@ -37,17 +37,17 @@ type GetMethodResponse struct {
} `json:"result"`
}
type shipmentType uint
type ShipmentType uint
const (
JdSelf shipmentType = iota + 1
JdSelf ShipmentType = iota + 1
JdOther
Third
Normal
NotSupport = 9
)
var shipmentTypeMap = map[shipmentType]string{
var shipmentTypeMap = map[ShipmentType]string{
JdSelf: "京东配送",
JdOther: "京配转三方配送",
Third: "第三方配送",
@ -55,7 +55,7 @@ var shipmentTypeMap = map[shipmentType]string{
NotSupport: "不支持配送",
}
func (o shipmentType) String() string {
func (o ShipmentType) String() string {
if value, ok := shipmentTypeMap[o]; !ok {
return rest.UnKnow
} else {
@ -64,7 +64,7 @@ func (o shipmentType) String() string {
}
type GetMethodParams struct {
ShipmentType shipmentType `json:"shipmentType"`
ShipmentType ShipmentType `json:"ShipmentType"`
ShipmentInfoList []ShipmentInfoParams `json:"shipmentInfoList"`
}
@ -74,17 +74,17 @@ type ShipmentInfoParams struct {
}
type ShipmentDetailParams struct {
ShipmentType shipmentType `json:"shipmentType"`
ShipmentType ShipmentType `json:"ShipmentType"`
AttachmentList []Attachment `json:"attachmentList"`
GiftList []Gift `json:"giftList"`
}
type Attachment struct {
SkuID string `json:"skuId"`
ShipmentType shipmentType `json:"shipmentType"`
ShipmentType ShipmentType `json:"ShipmentType"`
}
type Gift struct {
SkuID string `json:"skuId"`
ShipmentType shipmentType `json:"shipmentType"`
ShipmentType ShipmentType `json:"ShipmentType"`
}

@ -45,7 +45,7 @@ type Detail struct {
}
type ShipmentParam struct {
ShipmentType uint `json:"shipmentType"`
ShipmentType uint `json:"ShipmentType"`
}
type RelateFee struct {

@ -19,7 +19,7 @@ type Param struct {
Address rest.Address `json:"address"`
Receiver ReceiverParam `json:"receiver"`
PaymentType uint `json:"paymentType"`
ShipmentType shipmentType `json:"shipmentType"`
ShipmentType ShipmentType `json:"ShipmentType"`
ChannelOrderSource string `json:"channelOrderSource"`
SendGoods uint `json:"sendGoods"`
UserIp string `json:"userIp"`

Loading…
Cancel
Save