1
This commit is contained in:
@@ -1744,10 +1744,17 @@ func UpdateStoresSkus(ctx *jxcontext.Context, causeFlag int, storeIDs []int, sku
|
||||
}
|
||||
} else {
|
||||
flag, _ := doStoreSkuAudit(ctx, storeIDs, skuBindInfos)
|
||||
if storeIDs[0] == 668470 {
|
||||
globals.SugarLogger.Debugf("--------UpdateStoresSkus %s,%s", utils.Format4Output(storeIDs, false), utils.Format4Output(skuBindInfos, false))
|
||||
globals.SugarLogger.Debugf("--------flag := %s", utils.Format4Output(flag, false))
|
||||
}
|
||||
if !flag {
|
||||
var num int64
|
||||
db := dao.GetDB()
|
||||
skuIDs, err := updateStoresSkusWithoutSync(ctx, db, storeIDs, skuBindInfos, isScale, isRefreshHigh) // 这个方法再通知京东创建商品
|
||||
if storeIDs[0] == 668470 {
|
||||
globals.SugarLogger.Debugf("----------updateStoresSkusWithoutSync :%s", utils.Format4Output(skuIDs, false))
|
||||
}
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
@@ -2021,7 +2028,9 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
|
||||
}
|
||||
}
|
||||
unitPrice = int(math.Floor(float64(unitPrice)*scaleFactor/10+0.5)) * 10 //四舍五入 价格为100倍 角分为十位个位 除以10 + 0.5对分位向下取整(完成四舍五入的方法)
|
||||
globals.SugarLogger.Debugf("-----------allBinds := %s", utils.Format4Output(allBinds, false))
|
||||
if skuBindInfo.StoreID == 668470 {
|
||||
globals.SugarLogger.Debugf("-----------allBinds := %s", utils.Format4Output(allBinds, false))
|
||||
}
|
||||
for _, v := range allBinds {
|
||||
if v.Stock == 0 {
|
||||
v.Stock = model.MaxStoreSkuStockQty
|
||||
|
||||
Reference in New Issue
Block a user