- OrderExtraInfo
This commit is contained in:
@@ -74,6 +74,11 @@ const (
|
||||
RefundTypePart = 2
|
||||
)
|
||||
|
||||
const (
|
||||
ExtrasPromotionTypeTaoCanZeng = 4 // 套餐赠
|
||||
ExtrasPromotionTypeManZeng = 5 // 满赠
|
||||
)
|
||||
|
||||
type RefundSku struct {
|
||||
AppFoodCode string `json:"app_food_code"`
|
||||
SkuID string `json:"sku_id,omitempty"`
|
||||
@@ -97,7 +102,7 @@ type RefundOrderDetail struct {
|
||||
ApplyReason string `json:"apply_reason"`
|
||||
ApplyType int `json:"apply_type"`
|
||||
CTime int64 `json:"ctime"`
|
||||
Money float32 `json:"money"`
|
||||
Money float64 `json:"money"`
|
||||
OrderID int64 `json:"order_id"`
|
||||
Pictures []string `json:"pictures"`
|
||||
RefundType int `json:"refund_type"`
|
||||
@@ -108,6 +113,15 @@ type RefundOrderDetail struct {
|
||||
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 {
|
||||
AppOrderCode string `json:"app_order_code"`
|
||||
AppPoiCode string `json:"app_poi_code"`
|
||||
@@ -122,6 +136,7 @@ type OrderInfo struct {
|
||||
DinnersNumber int `json:"dinners_number"`
|
||||
ExpectDeliverTime int `json:"expect_deliver_time"`
|
||||
Extras string `json:"extras"`
|
||||
ExtraList []*OrderExtraInfo `json:"extraList"`
|
||||
HasInvoiced int `json:"has_invoiced"`
|
||||
InvoiceTitle string `json:"invoice_title"`
|
||||
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) {
|
||||
orderMap, err := a.OrderGetOrderDetail(orderID, isMTLogistics)
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user