- don't call FilterMb4 when saving order, instead call FilterMb4 when create waybill.

This commit is contained in:
gazebo
2018-10-31 11:53:35 +08:00
parent f0cd9aee08
commit 0e09f42468
6 changed files with 19 additions and 20 deletions

View File

@@ -101,8 +101,8 @@ func (c *DeliveryHandler) CreateWaybill(order *model.GoodsOrder, policy func(del
OriginID: jxutils.ComposeUniversalOrderID(order.VendorOrderID, order.VendorID),
CargoPrice: jxutils.IntPrice2Standard(order.ActualPayPrice),
IsPrepay: 0,
ReceiverName: order.ConsigneeName,
ReceiverAddress: order.ConsigneeAddress,
ReceiverName: utils.FilterMb4(order.ConsigneeName),
ReceiverAddress: utils.FilterMb4(order.ConsigneeAddress),
ReceiverPhone: order.ConsigneeMobile,
}
if billParams.CargoPrice > maxCargoPrice {
@@ -112,7 +112,7 @@ 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": order.BuyerComment,
"info": utils.FilterMb4(order.BuyerComment),
// "origin_mark": model.VendorNames[order.VendorID],
"origin_mark_no": fmt.Sprintf("%d", order.OrderSeq),
"cargo_type": 13,