From 135938cfa9dc20153b15e47ad8b2d10a2a4adc74 Mon Sep 17 00:00:00 2001 From: gazebo Date: Thu, 25 Oct 2018 15:58:23 +0800 Subject: [PATCH] - fix GenFakeID --- business/jxstore/cms/sync.go | 1 + business/jxutils/jxutils_cms.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/business/jxstore/cms/sync.go b/business/jxstore/cms/sync.go index a0b6f7706..d1bfe40e7 100644 --- a/business/jxstore/cms/sync.go +++ b/business/jxstore/cms/sync.go @@ -88,6 +88,7 @@ func (p *MultiStoreHandlerWrapper) UpdateCategory(db *dao.DaoDB, cat *model.SkuC } func (p *MultiStoreHandlerWrapper) DeleteSku(db *dao.DaoDB, sku *model.Sku, userName string) (err error) { + globals.SugarLogger.Debugf("wrapper DeleteSku, sku:%s", utils.Format4Output(sku, false)) if jxutils.IsFakeID(sku.JdID) { return nil } diff --git a/business/jxutils/jxutils_cms.go b/business/jxutils/jxutils_cms.go index ae4d93efe..13df29ce2 100644 --- a/business/jxutils/jxutils_cms.go +++ b/business/jxutils/jxutils_cms.go @@ -146,7 +146,7 @@ func genFakeID1() int64 { } func GenFakeID() int64 { - return genFakeID1() * 2 + return genFakeID1() * 3 } func IsFakeID(id int64) bool { @@ -154,7 +154,7 @@ func IsFakeID(id int64) bool { return true } multiple := id / genFakeID1() - return multiple == 2 || multiple == 3 + return multiple == 2 || multiple == 3 || multiple == 4 } func FormalizePageSize(pageSize int) int {