- 将大部分使用IsFakeID改为IsEmptyID,这样更符合语义
This commit is contained in:
@@ -81,14 +81,14 @@ func Init() {
|
||||
}
|
||||
|
||||
func (p *MultiStoreHandlerWrapper) DeleteCategory(db *dao.DaoDB, cat *model.SkuCategory, userName string) (err error) {
|
||||
if jxutils.IsFakeID(cat.JdID) {
|
||||
if jxutils.IsEmptyID(cat.JdID) {
|
||||
return nil
|
||||
}
|
||||
return p.IMultipleStoresHandler.DeleteCategory(db, cat, userName)
|
||||
}
|
||||
|
||||
func (p *MultiStoreHandlerWrapper) UpdateCategory(db *dao.DaoDB, cat *model.SkuCategory, userName string) (err error) {
|
||||
if jxutils.IsFakeID(cat.JdID) {
|
||||
if jxutils.IsEmptyID(cat.JdID) {
|
||||
globals.SugarLogger.Warnf("UpdateCategory fakeid cat:%s should not get here", utils.Format4Output(cat, true))
|
||||
return nil
|
||||
}
|
||||
@@ -97,14 +97,14 @@ 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) {
|
||||
if jxutils.IsEmptyID(sku.JdID) {
|
||||
return nil
|
||||
}
|
||||
return p.IMultipleStoresHandler.DeleteSku(db, sku, userName)
|
||||
}
|
||||
|
||||
func (p *MultiStoreHandlerWrapper) UpdateSku(db *dao.DaoDB, sku *model.Sku, userName string) (err error) {
|
||||
if jxutils.IsFakeID(sku.JdID) {
|
||||
if jxutils.IsEmptyID(sku.JdID) {
|
||||
globals.SugarLogger.Warnf("UpdateSku fakeid sku:%s should not get here", utils.Format4Output(sku, true))
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user