This commit is contained in:
邹宗楠
2023-07-24 18:34:45 +08:00
parent 15beac082e
commit 6c04f1a71b
4 changed files with 100 additions and 77 deletions

View File

@@ -523,14 +523,14 @@ func (c *DeliveryHandler) GetDeliverLiquidatedDamages(orderId string, deliverId
return 0, err
}
isMerchantCancel := false
// 获取发起取消的人员
for _, v := range statusList {
if v.VendorStatus == utils.Int64ToStr(model.WaybillStatusCancel) {
isMerchantCancel = true // 商户取消
break
}
}
//isMerchantCancel := false
//// 获取发起取消的人员
//for _, v := range statusList {
// if v.VendorStatus == utils.Int64ToStr(model.WaybillStatusCancel) {
// isMerchantCancel = true // 商户取消
// break
// }
//}
bill, err := partner.CurOrderManager.LoadWaybill(deliverId, model.VendorIDMTPS)
if err != nil {
@@ -549,17 +549,17 @@ func (c *DeliveryHandler) GetDeliverLiquidatedDamages(orderId string, deliverId
}
// 到店
if statusList[i].VendorStatus == utils.Int2Str(mtpsapi.OrderStatusPickedUp) {
if isMerchantCancel {
return bill.DesiredFee, nil
}
return 0, nil
//if isMerchantCancel {
return bill.DesiredFee, nil
//}
//return 0, nil
}
// 接单
if statusList[i].VendorStatus == utils.Int2Str(mtpsapi.OrderStatusAccepted) {
if isMerchantCancel {
return 200, nil
}
return 0, nil
//if isMerchantCancel {
return 200, nil
//}
//return 0, nil
}
// 待调度
if statusList[i].VendorStatus == utils.Int2Str(mtpsapi.OrderStatusWaitingForSchedule) {