- fix remark bug

- write to temp_log when create mtps error.
This commit is contained in:
gazebo
2018-08-03 16:39:07 +08:00
parent 4862649d77
commit 423b087e70
2 changed files with 9 additions and 0 deletions

View File

@@ -209,6 +209,14 @@ func (c *WaybillController) CreateWaybill(order *model.GoodsOrder) (err error) {
_, err = api.MtpsAPI.CreateOrderByShop(billParams, addParams)
if err != nil {
globals.SugarLogger.Debugf("CreateWaybill, orderID:%s, billParams:%v, addParams:%v", order.VendorOrderID, billParams, addParams)
tmpLog := &legacymodel.TempLog{
VendorOrderID: order.VendorOrderID,
RefVendorOrderID: order.VendorOrderID,
IntValue1: addFee,
Msg: fmt.Sprintf("CreateWaybill orderID:%s addFee exceeded too much, it's %d", order.VendorOrderID, addFee),
}
db.Insert(tmpLog)
}
}
}

View File

@@ -27,6 +27,7 @@ func Waybill2Status(bill *Waybill) (retVal *OrderStatus) {
Status: bill.Status,
VendorStatus: bill.VendorStatus,
StatusTime: bill.StatusTime,
Remark: bill.Remark,
}
return retVal
}