- 三方运单添加详细的平台订单信息

This commit is contained in:
gazebo
2019-03-25 22:27:52 +08:00
parent 344b17d8ca
commit e22cd59b60
2 changed files with 8 additions and 3 deletions

View File

@@ -126,8 +126,8 @@ func (c *DeliveryHandler) CreateWaybill(order *model.GoodsOrder, policy func(del
if billParams.CityCode, err = c.getDataCityCodeFromOrder(order, db); err == nil {
billParams.ReceiverLng, billParams.ReceiverLat, _ = jxutils.IntCoordinate2MarsStandard(order.ConsigneeLng, order.ConsigneeLat, order.CoordinateType)
addParams := map[string]interface{}{
"info": utils.FilterMb4(order.BuyerComment),
// "origin_mark": model.VendorChineseNames[order.VendorID],
"info": utils.FilterMb4(order.BuyerComment),
"origin_mark": model.VendorChineseNames[order.VendorID],
"origin_mark_no": fmt.Sprintf("%d", order.OrderSeq),
"cargo_type": 13,
"cargo_weight": jxutils.IntWeight2Float(limitOrderWeight(order.Weight)),

View File

@@ -160,7 +160,12 @@ func (c *DeliveryHandler) CreateWaybill(order *model.GoodsOrder, policy func(del
item.GoodCount += goodItem.GoodCount
}
}
addParams := utils.Params2Map("note", utils.FilterMb4(order.BuyerComment), "goods_detail", string(utils.MustMarshal(goods)), "poi_seq", fmt.Sprintf("#%d", order.OrderSeq))
addParams := map[string]interface{}{
"note": utils.FilterMb4(order.BuyerComment),
"goods_detail": string(utils.MustMarshal(goods)),
"goods_pickup_info": fmt.Sprintf("%s第%d号单", model.VendorChineseNames[order.VendorID], order.OrderSeq),
"poi_seq": fmt.Sprintf("#%d", order.OrderSeq),
}
result, err2 := api.MtpsAPI.CreateOrderByShop(billParams, addParams)
if err = err2; err != nil {
globals.SugarLogger.Debugf("CreateWaybill failed, orderID:%s, billParams:%v, addParams:%v, error:%v", order.VendorOrderID, billParams, addParams, err)