OnXXThing依赖mdoel.IsUseThingMap返回错误

This commit is contained in:
gazebo
2019-12-11 08:53:32 +08:00
parent 96d1147257
commit d566ee38e3

View File

@@ -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) {