1
This commit is contained in:
@@ -316,6 +316,9 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
Weight: int(utils.Interface2Int64WithDefault(product["total_weight"], 0)) / productAmount,
|
||||
VendorPrice: utils.MustInterface2Int64(product["product_price"]),
|
||||
}
|
||||
if shelfPosition, ok := product["shelf_position"]; ok {
|
||||
sku.LocationCode = shelfPosition.(string)
|
||||
}
|
||||
var baiduRate int64
|
||||
sku.SalePrice, baiduRate, sku.StoreSubName = getSkuSalePrice(product)
|
||||
order.PmSubsidyMoney += baiduRate
|
||||
|
||||
@@ -524,6 +524,12 @@ func genSkuParamsFromStoreSkuInfo2(storeSku *dao.StoreSkuSyncInfo, isCreate, isE
|
||||
if isCreate /*storeSku.SkuSyncStatus&(model.SyncFlagPriceMask| model.SyncFlagNewMask) != 0 */ {
|
||||
params["sale_price"] = storeSku.VendorPrice
|
||||
}
|
||||
if storeSku.LocationCode != "" {
|
||||
params["shelf_number"] = storeSku.LocationCode
|
||||
}
|
||||
if storeSku.LocationCode == "EMPTY_VALUE" { // EMPTY_VALUE 美团置空
|
||||
params["shelf_number"] = ""
|
||||
}
|
||||
if storeSku.SkuSyncStatus&(model.SyncFlagSaleMask|model.SyncFlagNewMask) != 0 {
|
||||
params["status"] = jxSkuStatus2Ebai(storeSku.MergedStatus)
|
||||
}
|
||||
@@ -539,6 +545,7 @@ func genSkuParamsFromStoreSkuInfo2(storeSku *dao.StoreSkuSyncInfo, isCreate, isE
|
||||
if storeSku.MinOrderCount == 0 {
|
||||
params["minimum"] = utils.Int2Float64(1)
|
||||
}
|
||||
|
||||
return params
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user