From 1b2775761d74c747e44acb31acab0bbcd522582e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 21 Feb 2025 15:04:49 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/store_sku.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index aba6bb41b..0495639d7 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -1930,7 +1930,6 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs panic(r) } }() - globals.SugarLogger.Debugf("----------------------------1") for _, storeID := range storeIDs { // todo 可以考虑在需要更新价格再获取 storeDetail, err := dao.GetStoreDetail(dao.GetDB(), storeID, model.VendorIDJX, "") @@ -2005,7 +2004,6 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs FOR UPDATE` sqlParams = append(sqlParams, utils.DefaultTimeValue) // globals.SugarLogger.Debug(sql) - globals.SugarLogger.Debugf("----------------------------2") if err = dao.GetRows(db, &allBinds, sql, sqlParams...); err == nil { if len(allBinds) > 0 { inSkuBinsMap := make(map[int]*StoreSkuBindSkuInfo, len(inSkuBinds)) @@ -2167,7 +2165,6 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs } } } else { - globals.SugarLogger.Debugf("----------------------------3") // 用了SELECT FOR UPDATE后,只更新修改字段是没有必要的,暂时保留 updateFieldMap := make(map[string]interface{}) if skuBindInfo.IsFocus == 1 { // 关注之后再关注不操作 @@ -2182,7 +2179,6 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs // updateFieldMap["Price"] = 1 } if tmpStatus := getSkuSaleStatus(inSkuBind, skuBindInfo); tmpStatus != model.StoreSkuBindStatusNA { - globals.SugarLogger.Debugf("----------------------------4") if tmpStatus != skuBind.Status { updateFieldMap[model.FieldStatus] = 1 } @@ -2191,6 +2187,8 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs setStoreSkuBindStatus(skuBind, model.SyncFlagStockMask) if tmpStatus == model.StoreSkuBindStatusNormal { globals.SugarLogger.Debugf("----------------------------5") + globals.SugarLogger.Debugf("---------------------------5skuBind %s", utils.Format4Output(&skuBind, false)) + globals.SugarLogger.Debugf("---------------------------5skuBind %s", utils.Format4Output(&inSkuBind, false)) if skuBind.Stock == 0 && beego.BConfig.RunMode != model.ServerTypePet { skuBind.Stock = model.MaxStoreSkuStockQty } else {