- fix remark bug
- write to temp_log when create mtps error.
This commit is contained in:
@@ -209,6 +209,14 @@ func (c *WaybillController) CreateWaybill(order *model.GoodsOrder) (err error) {
|
|||||||
_, err = api.MtpsAPI.CreateOrderByShop(billParams, addParams)
|
_, err = api.MtpsAPI.CreateOrderByShop(billParams, addParams)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
globals.SugarLogger.Debugf("CreateWaybill, orderID:%s, billParams:%v, addParams:%v", order.VendorOrderID, billParams, addParams)
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ func Waybill2Status(bill *Waybill) (retVal *OrderStatus) {
|
|||||||
Status: bill.Status,
|
Status: bill.Status,
|
||||||
VendorStatus: bill.VendorStatus,
|
VendorStatus: bill.VendorStatus,
|
||||||
StatusTime: bill.StatusTime,
|
StatusTime: bill.StatusTime,
|
||||||
|
Remark: bill.Remark,
|
||||||
}
|
}
|
||||||
return retVal
|
return retVal
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user