- 在创建美团运单时生成费用信息

This commit is contained in:
gazebo
2019-05-16 11:05:24 +08:00
parent 21b2a628b2
commit cbc1a4fb88
2 changed files with 9 additions and 4 deletions

View File

@@ -97,9 +97,14 @@ func (w *OrderManager) OnWaybillStatusChanged(bill *model.Waybill) (err error) {
} else {
addParams := orm.Params{}
if bill.Status >= model.WaybillStatusAccepted && bill.Status < model.WaybillStatusEndBegin {
// if bill.Status == model.WaybillStatusAccepted {
// addParams["desired_fee"] = bill.DesiredFee
// }
if bill.Status == model.WaybillStatusAccepted {
if bill.DesiredFee > 0 {
addParams["desired_fee"] = bill.DesiredFee
}
if bill.ActualFee > 0 {
addParams["actual_fee"] = bill.ActualFee
}
}
if bill.CourierMobile != "" {
addParams["courier_name"] = bill.CourierName
addParams["courier_mobile"] = bill.CourierMobile