This commit is contained in:
苏尹岚
2020-07-09 09:44:27 +08:00
parent 1a4c2886d2
commit e62811eef1

View File

@@ -869,11 +869,13 @@ 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)
}
@@ -1020,7 +1022,6 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
if user := ctx.GetFullUser(); user != nil {
isUserCanDirectChangePrice = user.Type&model.UserTypeOperator != 0
}
fmt.Println("test1")
userName := ctx.GetUserName()
needSyncIDMap := make(map[int]int)
dao.Begin(db)
@@ -1037,7 +1038,6 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
dao.Rollback(db)
return nil, err
}
fmt.Println("test2")
scaleFactor := float64(1)
if isScale {
scaleFactor = 100 / float64(jxutils.ConstrainPayPercentage(storeDetail.PayPercentage))
@@ -1084,7 +1084,6 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
sqlParams = append(sqlParams, skuBindInfo.NameID, utils.DefaultTimeValue)
// globals.SugarLogger.Debug(sql)
if err = dao.GetRows(db, &allBinds, sql, sqlParams...); err == nil {
fmt.Println("test3")
if len(allBinds) > 0 {
// globals.SugarLogger.Debug(utils.Format4Output(allBinds, false))
inSkuBinsMap := make(map[int]*StoreSkuBindSkuInfo, len(inSkuBinds))