根据Excel更新京西价,修改异步任务中返回值

This commit is contained in:
苏尹岚
2019-12-12 16:25:27 +08:00
parent e918d834ec
commit 690453cd73

View File

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