diff --git a/platformapi/mtwmapi/mtwmapi_test.go b/platformapi/mtwmapi/mtwmapi_test.go index 6d90fcd9..443132fb 100644 --- a/platformapi/mtwmapi/mtwmapi_test.go +++ b/platformapi/mtwmapi/mtwmapi_test.go @@ -20,13 +20,13 @@ func init() { baseapi.Init(sugarLogger) // 菜市 - //api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "") + api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "") // 果园 //api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "") //商超 - api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_qLqTxHqWzajT7ep19a1Duw") //token_n4TwqCntWWuvQwAawzxC0w + //api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_qLqTxHqWzajT7ep19a1Duw") //token_n4TwqCntWWuvQwAawzxC0w cookieStr := ` acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1; ` diff --git a/platformapi/mtwmapi/order.go b/platformapi/mtwmapi/order.go index ad280a59..69fc260c 100644 --- a/platformapi/mtwmapi/order.go +++ b/platformapi/mtwmapi/order.go @@ -575,14 +575,14 @@ func (a *API) OrderLogisticsFee(orderID int64) (payFee float64, err error) { return 0, err } data := result.(map[string]interface{}) - // 美团运单,骑手确认订单之后取消的话就需要扣除全部的运单费用了 - if utils.Interface2Int64WithDefault(data["logistics_status"], 0) == utils.Str2Int64WithDefault(WaybillStatusCanceled, 0) { - if utils.Interface2Int64WithDefault(data["confirm_time"], 0) != 0 { - return utils.TryInterface2Float64(data["pay_amount"]) - } else { - return 0, nil - } - } + // 美团运单,骑手确认订单之后取消的话就需要扣除全部的运单费用了,到店之后取消订单也不支付骑手配送费 + //if utils.Interface2Int64WithDefault(data["logistics_status"], 0) == utils.Str2Int64WithDefault(WaybillStatusCanceled, 0) { + // if utils.Interface2Int64WithDefault(data["confirm_time"], 0) != 0 { + // return utils.TryInterface2Float64(data["pay_amount"]) + // } else { + // return 0, nil + // } + //} return utils.TryInterface2Float64(data["pay_amount"]) } diff --git a/platformapi/mtwmapi/order_test.go b/platformapi/mtwmapi/order_test.go index e062b6e5..585eb46c 100644 --- a/platformapi/mtwmapi/order_test.go +++ b/platformapi/mtwmapi/order_test.go @@ -88,7 +88,7 @@ func TestOrderLogisticsStatus(t *testing.T) { } func TestOrderLogisticsFee(t *testing.T) { - result, err := api.OrderLogisticsFee(1100687990339131759) + result, err := api.OrderLogisticsFee(1000689383169325780) if err != nil { t.Fatal(err) }