- add remark in orderstatus table.

- check order.waybill vendor id in swtich2SelfDeliverWithRetry.
This commit is contained in:
gazebo
2018-08-02 18:07:54 +08:00
parent ba98cf1e27
commit fbef61c768
5 changed files with 35 additions and 25 deletions

View File

@@ -92,6 +92,7 @@ func (c *WaybillController) callbackMsg2Waybill(msg *mtpsapi.CallbackOrderMsg) (
CourierMobile: msg.CourierPhone,
VendorStatus: utils.Int2Str(msg.Status),
StatusTime: utils.Timestamp2Time(msg.Timestamp),
Remark: msg.CancelReason,
}
retVal.VendorOrderID, retVal.OrderVendorID = jxutils.SplitUniversalOrderID(msg.OrderID)
return retVal
@@ -204,7 +205,7 @@ func (c *WaybillController) CreateWaybill(order *model.GoodsOrder) (err error) {
item.GoodCount += goodItem.GoodCount
}
}
addParams := utils.Params2Map("note", order.BuyerComment, "goods_detail", string(utils.MustMarshal(goods)), "poi_seq", fmt.Sprintf("%s#%d", model.VendorChineseNames[order.VendorID], order.OrderSeq))
addParams := utils.Params2Map("note", order.BuyerComment, "goods_detail", string(utils.MustMarshal(goods)), "poi_seq", fmt.Sprintf("#%d", order.OrderSeq))
_, err = api.MtpsAPI.CreateOrderByShop(billParams, addParams)
if err != nil {
globals.SugarLogger.Debugf("CreateWaybill, orderID:%s, billParams:%v, addParams:%v", order.VendorOrderID, billParams, addParams)