1
This commit is contained in:
@@ -319,6 +319,16 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
if shelfPosition, ok := product["shelf_position"]; ok {
|
||||
sku.LocationCode = shelfPosition.(string)
|
||||
}
|
||||
if sku.SkuID == 0 {
|
||||
if product["upc"] != nil {
|
||||
sku.SkuID = utils.Str2Int(strings.Split(product["upc"].(string), "-")[1])
|
||||
} else if product["baidu_product_id"] != nil {
|
||||
skuBind, err := dao.GetStoreSkuByVendorSkuId(order.StoreID, model.VendorIDEBAI, product["baidu_product_id"].(string))
|
||||
if err == nil && skuBind != nil {
|
||||
sku.SkuID = skuBind.SkuID
|
||||
}
|
||||
}
|
||||
}
|
||||
var baiduRate int64
|
||||
sku.SalePrice, baiduRate, sku.StoreSubName = getSkuSalePrice(product)
|
||||
order.PmSubsidyMoney += baiduRate
|
||||
|
||||
Reference in New Issue
Block a user