From d566ee38e3a3304043b1863610ee469fc13fbaff Mon Sep 17 00:00:00 2001 From: gazebo Date: Wed, 11 Dec 2019 08:53:32 +0800 Subject: [PATCH] =?UTF-8?q?OnXXThing=E4=BE=9D=E8=B5=96mdoel.IsUseThingMap?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sync2.go | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) 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) {