根据Excel更新京西价,修改异步任务中返回值
This commit is contained in:
@@ -2097,10 +2097,10 @@ func ReCalculateJxPrice(db *dao.DaoDB, ctx *jxcontext.Context, storeIDs []int) (
|
|||||||
dao.UpdateEntity(db, skuBind)
|
dao.UpdateEntity(db, skuBind)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return "", err
|
return nil, err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return "", err
|
return nil, err
|
||||||
}
|
}
|
||||||
return retVal, err
|
return retVal, err
|
||||||
}, storeIDs)
|
}, storeIDs)
|
||||||
@@ -2237,8 +2237,12 @@ func RefreshJxPriceByExcelBin(ctx *jxcontext.Context, storeIDs []int, reader io.
|
|||||||
err = err2
|
err = err2
|
||||||
if len(skuList) > 0 {
|
if len(skuList) > 0 {
|
||||||
unitPrice := 0
|
unitPrice := 0
|
||||||
if storeSkuNamePrice.Unit == "KG" {
|
if skuList[0].Unit == model.UnitNames[0] {
|
||||||
unitPrice = storeSkuNamePrice.Price / 2
|
if storeSkuNamePrice.Unit == "KG" {
|
||||||
|
unitPrice = storeSkuNamePrice.Price / 2
|
||||||
|
} else {
|
||||||
|
unitPrice = storeSkuNamePrice.Price
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
unitPrice = storeSkuNamePrice.Price
|
unitPrice = storeSkuNamePrice.Price
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user