This commit is contained in:
邹宗楠
2024-12-04 14:11:47 +08:00
parent 2c7dd39195
commit a4d92205fd
7 changed files with 67 additions and 54 deletions

View File

@@ -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

View File

@@ -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
}