美团跑腿骑手到店之后也不需要支付配送费

This commit is contained in:
邹宗楠
2023-08-23 15:26:23 +08:00
parent 382cc6a67f
commit 2dd0301d73
3 changed files with 11 additions and 11 deletions

View File

@@ -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"])
}