修改美团跑腿取消订单的违约金扣除

This commit is contained in:
邹宗楠
2023-08-29 15:01:33 +08:00
parent aafbdf24ee
commit dfb3e22c93
2 changed files with 8 additions and 8 deletions

View File

@@ -576,13 +576,13 @@ func (a *API) OrderLogisticsFee(orderID int64) (payFee float64, err error) {
} }
data := result.(map[string]interface{}) data := result.(map[string]interface{})
// 美团运单,骑手确认订单之后取消的话就需要扣除全部的运单费用了,到店之后取消订单也不支付骑手配送费 // 美团运单,骑手确认订单之后取消的话就需要扣除全部的运单费用了,到店之后取消订单也不支付骑手配送费
//if utils.Interface2Int64WithDefault(data["logistics_status"], 0) == utils.Str2Int64WithDefault(WaybillStatusCanceled, 0) { if utils.Interface2Int64WithDefault(data["logistics_status"], 0) == utils.Str2Int64WithDefault(WaybillStatusCanceled, 0) {
// if utils.Interface2Int64WithDefault(data["confirm_time"], 0) != 0 { if utils.Interface2Int64WithDefault(data["dispatcher_reach_poi_time"], 0) != 0 {
// return utils.TryInterface2Float64(data["pay_amount"]) return 2, nil
// } else { } else {
// return 0, nil return 0, nil
// } }
//} }
return utils.TryInterface2Float64(data["pay_amount"]) return utils.TryInterface2Float64(data["pay_amount"])
} }

View File

@@ -88,7 +88,7 @@ func TestOrderLogisticsStatus(t *testing.T) {
} }
func TestOrderLogisticsFee(t *testing.T) { func TestOrderLogisticsFee(t *testing.T) {
result, err := api.OrderLogisticsFee(900697881770969420) result, err := api.OrderLogisticsFee(900699270657684955)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }