测试updatestoresskus
This commit is contained in:
@@ -897,13 +897,11 @@ func UpdateStoresSkus(ctx *jxcontext.Context, causeFlag int, storeIDs []int, sku
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
fmt.Println("test12")
|
||||
isAsync = asyncStoreSkuOpFilter(ctx, isAsync)
|
||||
num = int64(len(skuIDs))
|
||||
if num > 0 {
|
||||
hint, err = CurVendorSync.SyncStoresSkus(ctx, nil, causeFlag, db, nil, storeIDs, skuIDs, false, isAsync, isContinueWhenError)
|
||||
}
|
||||
fmt.Println("test22")
|
||||
if num == 0 || !isAsync || hint == "" {
|
||||
hint = utils.Int64ToStr(num)
|
||||
}
|
||||
@@ -1139,6 +1137,7 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
|
||||
unitPrice = int(float64(unitPrice) * scaleFactor)
|
||||
for _, v := range allBinds {
|
||||
var num int64
|
||||
fmt.Println("test1111111111111111111111111111111111")
|
||||
inSkuBind := inSkuBinsMap[v.RealSkuID]
|
||||
isCanChangePrice := (isUserCanDirectChangePrice || jxutils.TranslateStorePriceType(v.ChangePriceType) != model.StoreChangePriceTypeBossDisabled)
|
||||
// globals.SugarLogger.Debug(utils.Format4Output(inSkuBind, false))
|
||||
@@ -1239,6 +1238,7 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
|
||||
skuBind.Status = tmpStatus
|
||||
setStoreSkuBindStatus(skuBind, model.SyncFlagSaleMask)
|
||||
}
|
||||
fmt.Println("test2222222222222222222222222222222222222")
|
||||
if skuBindInfo.UnitPrice != 0 && isCanChangePrice { // 这里是否需要加此条件限制
|
||||
price := jxutils.CaculateSkuPrice(unitPrice, v.SpecQuality, v.SpecUnit, v.SkuNameUnit)
|
||||
jxPrice := jxutils.CaculatePriceByPricePack(storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage), price)
|
||||
@@ -1282,6 +1282,7 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
|
||||
err = AddEventDetail(db, ctx, model.OperateUpdate, v.RealSkuID, model.ThingTypeSku, storeID, BuildDiffData(mapBefore), BuildDiffData(mapAfter))
|
||||
}
|
||||
}
|
||||
fmt.Println("test33333333333333333333333333333333")
|
||||
if len(updateFieldMap) > 0 {
|
||||
updateFieldMap[model.FieldJdSyncStatus] = 1
|
||||
updateFieldMap[model.FieldEbaiSyncStatus] = 1
|
||||
|
||||
Reference in New Issue
Block a user