From 044f5860b15d9553ce7fc1145a7cbac00646429f Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 5 Aug 2019 15:22:17 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8DDeleteConfig=E4=B8=AD?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=93=B6=E8=A1=8C=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/cms.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/business/jxstore/cms/cms.go b/business/jxstore/cms/cms.go index 9a4a8799e..191983093 100644 --- a/business/jxstore/cms/cms.go +++ b/business/jxstore/cms/cms.go @@ -241,9 +241,9 @@ func DeleteConfig(ctx *jxcontext.Context, key, configType string) (err error) { if err = checkConfig(configType, key, ""); err != nil { return err } + db := dao.GetDB() switch configType { case model.ConfigTypePricePack: - db := dao.GetDB() storeMapList, err := dao.GetStoresMapList(db, nil, nil, model.StoreStatusAll, model.StoreIsSyncYes, key) if err != nil { return err @@ -255,11 +255,11 @@ func DeleteConfig(ctx *jxcontext.Context, key, configType string) (err error) { } return fmt.Errorf("还有门店在使用价格包:%s,门店信息:%s", key, strings.Join(storeInfo, ",")) } - _, err = dao.DeleteEntityLogically(db, &model.NewConfig{}, nil, ctx.GetUserName(), map[string]interface{}{ - "Key": key, - "Type": configType, - }) } + _, err = dao.DeleteEntityLogically(db, &model.NewConfig{}, nil, ctx.GetUserName(), map[string]interface{}{ + "Key": key, + "Type": configType, + }) return err }