- OrderExtraInfo
This commit is contained in:
@@ -74,6 +74,11 @@ const (
|
|||||||
RefundTypePart = 2
|
RefundTypePart = 2
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
ExtrasPromotionTypeTaoCanZeng = 4 // 套餐赠
|
||||||
|
ExtrasPromotionTypeManZeng = 5 // 满赠
|
||||||
|
)
|
||||||
|
|
||||||
type RefundSku struct {
|
type RefundSku struct {
|
||||||
AppFoodCode string `json:"app_food_code"`
|
AppFoodCode string `json:"app_food_code"`
|
||||||
SkuID string `json:"sku_id,omitempty"`
|
SkuID string `json:"sku_id,omitempty"`
|
||||||
@@ -97,7 +102,7 @@ type RefundOrderDetail struct {
|
|||||||
ApplyReason string `json:"apply_reason"`
|
ApplyReason string `json:"apply_reason"`
|
||||||
ApplyType int `json:"apply_type"`
|
ApplyType int `json:"apply_type"`
|
||||||
CTime int64 `json:"ctime"`
|
CTime int64 `json:"ctime"`
|
||||||
Money float32 `json:"money"`
|
Money float64 `json:"money"`
|
||||||
OrderID int64 `json:"order_id"`
|
OrderID int64 `json:"order_id"`
|
||||||
Pictures []string `json:"pictures"`
|
Pictures []string `json:"pictures"`
|
||||||
RefundType int `json:"refund_type"`
|
RefundType int `json:"refund_type"`
|
||||||
@@ -108,6 +113,15 @@ type RefundOrderDetail struct {
|
|||||||
WmOrderIDView int64 `json:"wm_order_id_view"`
|
WmOrderIDView int64 `json:"wm_order_id_view"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type OrderExtraInfo struct {
|
||||||
|
ActDetailID int `json:"act_detail_id,omitempty"`
|
||||||
|
MtCharge float64 `json:"mt_charge,omitempty"`
|
||||||
|
PoiCharge float64 `json:"poi_charge,omitempty"`
|
||||||
|
ReduceFee float64 `json:"reduce_fee,omitempty"`
|
||||||
|
Remark string `json:"remark,omitempty"`
|
||||||
|
Type int `json:"type,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
type OrderInfo struct {
|
type OrderInfo struct {
|
||||||
AppOrderCode string `json:"app_order_code"`
|
AppOrderCode string `json:"app_order_code"`
|
||||||
AppPoiCode string `json:"app_poi_code"`
|
AppPoiCode string `json:"app_poi_code"`
|
||||||
@@ -122,6 +136,7 @@ type OrderInfo struct {
|
|||||||
DinnersNumber int `json:"dinners_number"`
|
DinnersNumber int `json:"dinners_number"`
|
||||||
ExpectDeliverTime int `json:"expect_deliver_time"`
|
ExpectDeliverTime int `json:"expect_deliver_time"`
|
||||||
Extras string `json:"extras"`
|
Extras string `json:"extras"`
|
||||||
|
ExtraList []*OrderExtraInfo `json:"extraList"`
|
||||||
HasInvoiced int `json:"has_invoiced"`
|
HasInvoiced int `json:"has_invoiced"`
|
||||||
InvoiceTitle string `json:"invoice_title"`
|
InvoiceTitle string `json:"invoice_title"`
|
||||||
IsFavorites bool `json:"is_favorites"`
|
IsFavorites bool `json:"is_favorites"`
|
||||||
@@ -250,7 +265,9 @@ func (a *API) OrderGetOrderDetail(orderID int64, isMTLogistics bool) (orderInfo
|
|||||||
func (a *API) OrderGetOrderDetail2(orderID int64, isMTLogistics bool) (orderInfo *OrderInfo, err error) {
|
func (a *API) OrderGetOrderDetail2(orderID int64, isMTLogistics bool) (orderInfo *OrderInfo, err error) {
|
||||||
orderMap, err := a.OrderGetOrderDetail(orderID, isMTLogistics)
|
orderMap, err := a.OrderGetOrderDetail(orderID, isMTLogistics)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
err = utils.Map2StructByJson(orderMap, &orderInfo, false)
|
if err = utils.Map2StructByJson(orderMap, &orderInfo, false); err == nil {
|
||||||
|
err = utils.UnmarshalUseNumber([]byte(orderInfo.Extras), &orderInfo.ExtraList)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return orderInfo, err
|
return orderInfo, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user