1
This commit is contained in:
@@ -322,7 +322,7 @@ func storeSkuSyncInfo2Bare(inSku *dao.StoreSkuSyncInfo) (outSku *partner.StoreSk
|
|||||||
SpecQuality: inSku.SpecQuality,
|
SpecQuality: inSku.SpecQuality,
|
||||||
}
|
}
|
||||||
if !isStoreSkuSyncNeedDelete(inSku) {
|
if !isStoreSkuSyncNeedDelete(inSku) {
|
||||||
if inSku.Stock == 0 {
|
if inSku.Stock == 0 && beego.BConfig.RunMode != model.ServerTypePet {
|
||||||
outSku.Stock = model.MaxStoreSkuStockQty
|
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,
|
task := tasksch.NewParallelTask("syncStoreSkuNew", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError2), ctx,
|
||||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
step := batchItemList[0].(int)
|
step := batchItemList[0].(int)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package mtwm
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
beego "github.com/astaxie/beego/server/web"
|
||||||
"math"
|
"math"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -620,7 +621,7 @@ func SwitchAttr(apiObj *mtwmapi.API, vendorStoreID string, vendorCatID int64, na
|
|||||||
}
|
}
|
||||||
|
|
||||||
func stockCount2Mtwm(stock int) (mtwmStock string) {
|
func stockCount2Mtwm(stock int) (mtwmStock string) {
|
||||||
if stock == 0 {
|
if stock == 0 && beego.BConfig.RunMode != model.ServerTypePet {
|
||||||
stock = model.MaxStoreSkuStockQty
|
stock = model.MaxStoreSkuStockQty
|
||||||
}
|
}
|
||||||
return utils.Int2Str(stock)
|
return utils.Int2Str(stock)
|
||||||
|
|||||||
Reference in New Issue
Block a user