diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 8e4ca1062..78e8eb85f 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -2097,10 +2097,10 @@ func ReCalculateJxPrice(db *dao.DaoDB, ctx *jxcontext.Context, storeIDs []int) ( dao.UpdateEntity(db, skuBind) } } else { - return "", err + return nil, err } } else { - return "", err + return nil, err } return retVal, err }, storeIDs) @@ -2237,8 +2237,12 @@ func RefreshJxPriceByExcelBin(ctx *jxcontext.Context, storeIDs []int, reader io. err = err2 if len(skuList) > 0 { unitPrice := 0 - if storeSkuNamePrice.Unit == "KG" { - unitPrice = storeSkuNamePrice.Price / 2 + if skuList[0].Unit == model.UnitNames[0] { + if storeSkuNamePrice.Unit == "KG" { + unitPrice = storeSkuNamePrice.Price / 2 + } else { + unitPrice = storeSkuNamePrice.Price + } } else { unitPrice = storeSkuNamePrice.Price }