运单结束状态时,更新快递员信息
This commit is contained in:
@@ -132,7 +132,7 @@ func (w *OrderManager) OnWaybillStatusChanged(bill *model.Waybill) (err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
addParams := orm.Params{}
|
addParams := orm.Params{}
|
||||||
if bill.Status >= model.WaybillStatusAccepted && bill.Status < model.WaybillStatusEndBegin {
|
if bill.Status >= model.WaybillStatusAccepted {
|
||||||
if bill.Status == model.WaybillStatusAccepted {
|
if bill.Status == model.WaybillStatusAccepted {
|
||||||
if bill.DesiredFee > 0 {
|
if bill.DesiredFee > 0 {
|
||||||
addParams["desired_fee"] = bill.DesiredFee
|
addParams["desired_fee"] = bill.DesiredFee
|
||||||
@@ -145,9 +145,10 @@ func (w *OrderManager) OnWaybillStatusChanged(bill *model.Waybill) (err error) {
|
|||||||
addParams["courier_name"] = bill.CourierName
|
addParams["courier_name"] = bill.CourierName
|
||||||
addParams["courier_mobile"] = bill.CourierMobile
|
addParams["courier_mobile"] = bill.CourierMobile
|
||||||
}
|
}
|
||||||
} else if bill.Status >= model.WaybillStatusEndBegin {
|
if bill.Status >= model.WaybillStatusEndBegin {
|
||||||
addParams["waybill_finished_at"] = bill.StatusTime
|
addParams["waybill_finished_at"] = bill.StatusTime
|
||||||
}
|
}
|
||||||
|
}
|
||||||
duplicatedCount, err = w.addWaybillStatus(bill, db, addParams)
|
duplicatedCount, err = w.addWaybillStatus(bill, db, addParams)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
dao.Rollback(db)
|
dao.Rollback(db)
|
||||||
|
|||||||
Reference in New Issue
Block a user