diff --git a/business/jxstore/cms/sync2.go b/business/jxstore/cms/sync2.go index f84310780..bc51053da 100644 --- a/business/jxstore/cms/sync2.go +++ b/business/jxstore/cms/sync2.go @@ -168,8 +168,10 @@ func OnCreateThing(ctx *jxcontext.Context, db *dao.DaoDB, thingID int64, thingTy dao.WrapAddIDCULDEntity(thingMap, ctx.GetUserName()) errList.AddErr(dao.CreateEntity(db, thingMap)) } - // return errList.GetErrListAsOne() - return nil + if model.IsUseThingMap { + err = errList.GetErrListAsOne() + } + return err } func OnUpdateThing(ctx *jxcontext.Context, db *dao.DaoDB, thingID int64, thingType int8) (err error) { @@ -194,8 +196,10 @@ func OnUpdateThing(ctx *jxcontext.Context, db *dao.DaoDB, thingID int64, thingTy errList.AddErr(err2) } } - // return errList.GetErrListAsOne() - return nil + if model.IsUseThingMap { + err = errList.GetErrListAsOne() + } + return err } func OnDeleteThing(ctx *jxcontext.Context, db *dao.DaoDB, thingID int64, thingType int8) (err error) { @@ -225,8 +229,10 @@ func OnDeleteThing(ctx *jxcontext.Context, db *dao.DaoDB, thingID int64, thingTy errList.AddErr(err2) } } - // return errList.GetErrListAsOne() - return nil + if model.IsUseThingMap { + err = errList.GetErrListAsOne() + } + return err } func SkuCategoryVendor2ThingMap(cat *dao.SkuStoreCatInfo) (thingMap *model.ThingMap) {