diff --git a/business/jxstore/cms/sync_store_sku.go b/business/jxstore/cms/sync_store_sku.go index 5ea475eb5..08a5842b9 100644 --- a/business/jxstore/cms/sync_store_sku.go +++ b/business/jxstore/cms/sync_store_sku.go @@ -322,7 +322,7 @@ func storeSkuSyncInfo2Bare(inSku *dao.StoreSkuSyncInfo) (outSku *partner.StoreSk SpecQuality: inSku.SpecQuality, } if !isStoreSkuSyncNeedDelete(inSku) { - if inSku.Stock == 0 { + if inSku.Stock == 0 && beego.BConfig.RunMode != model.ServerTypePet { outSku.Stock = model.MaxStoreSkuStockQty } } @@ -750,6 +750,16 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag } + globals.SugarLogger.Debugf("------createList := %s", utils.Format4Output(createList, false)) + globals.SugarLogger.Debugf("------updateList := %s", utils.Format4Output(updateList, false)) + globals.SugarLogger.Debugf("------deleteList := %s", utils.Format4Output(deleteList, false)) + globals.SugarLogger.Debugf("------stockList := %s", utils.Format4Output(stockList, false)) + globals.SugarLogger.Debugf("------onlineList := %s", utils.Format4Output(onlineList, false)) + globals.SugarLogger.Debugf("------offlineList := %s", utils.Format4Output(offlineList, false)) + globals.SugarLogger.Debugf("------priceList := %s", utils.Format4Output(priceList, false)) + globals.SugarLogger.Debugf("------updateItems := %s", utils.Format4Output(updateItems, false)) + globals.SugarLogger.Debugf("------reorderSkuMap := %s", utils.Format4Output(reorderSkuMap, false)) + task := tasksch.NewParallelTask("syncStoreSkuNew", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError2), ctx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { step := batchItemList[0].(int) diff --git a/business/partner/purchase/mtwm/store_sku2.go b/business/partner/purchase/mtwm/store_sku2.go index 331152401..603d13e15 100644 --- a/business/partner/purchase/mtwm/store_sku2.go +++ b/business/partner/purchase/mtwm/store_sku2.go @@ -3,6 +3,7 @@ package mtwm import ( "encoding/json" "fmt" + beego "github.com/astaxie/beego/server/web" "math" "regexp" "strings" @@ -620,7 +621,7 @@ func SwitchAttr(apiObj *mtwmapi.API, vendorStoreID string, vendorCatID int64, na } func stockCount2Mtwm(stock int) (mtwmStock string) { - if stock == 0 { + if stock == 0 && beego.BConfig.RunMode != model.ServerTypePet { stock = model.MaxStoreSkuStockQty } return utils.Int2Str(stock)