- use new jx to process jd bad comment and elm urge order

This commit is contained in:
gazebo
2018-10-09 10:14:28 +08:00
parent 818a7d95b1
commit 7f2d829914
7 changed files with 78 additions and 12 deletions

View File

@@ -106,3 +106,18 @@ func (w *OrderManager) addWaybillStatus(bill *model.Waybill, db orm.Ormer, addPa
}
return isDuplicated, err
}
func (c *OrderManager) LoadWaybill(vendorWaybillID string, waybillVendorID int) (bill *model.Waybill, err error) {
db := orm.NewOrm()
bill = &model.Waybill{
VendorWaybillID: vendorWaybillID,
WaybillVendorID: waybillVendorID,
}
if err = db.Read(bill, "VendorWaybillID", "WaybillVendorID"); err != nil {
if err == orm.ErrNoRows {
err = ErrCanNotFindWaybill
}
globals.SugarLogger.Infof("LoadWaybill vendorWaybillID:%s failed with error:%v", vendorWaybillID, err)
}
return bill, err
}