根据Excel更新京西价,修改异步任务中返回值
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user