- handle ConsigneeName maybe missing

This commit is contained in:
gazebo
2019-02-13 10:56:00 +08:00
parent 3bb1b0d742
commit 3f6c713a23

View File

@@ -96,12 +96,12 @@ func (c *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
order = &model.GoodsOrder{
VendorOrderID: orderID,
VendorID: model.VendorIDJD,
VendorStoreID: result["produceStationNo"].(string),
VendorStoreID: utils.Interface2String(result["produceStationNo"]),
StoreID: int(utils.Str2Int64WithDefault(utils.Interface2String(result["produceStationNoIsv"]), 0)),
StoreName: utils.Interface2String(result["produceStationName"]),
ConsigneeName: result["buyerFullName"].(string),
ConsigneeMobile: result["buyerMobile"].(string),
ConsigneeAddress: result["buyerFullAddress"].(string),
ConsigneeName: utils.Interface2String(result["buyerFullName"]),
ConsigneeMobile: utils.Interface2String(result["buyerMobile"]),
ConsigneeAddress: utils.Interface2String(result["buyerFullAddress"]),
CoordinateType: model.CoordinateTypeMars,
BuyerComment: utils.TrimBlankChar(utils.Interface2String(result["orderBuyerRemark"])),
ExpectedDeliveredTime: utils.Str2TimeWithDefault(utils.Interface2String(result["orderPreEndDeliveryTime"]), utils.DefaultTimeValue),