From 044f5860b15d9553ce7fc1145a7cbac00646429f Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 5 Aug 2019 15:22:17 +0800 Subject: [PATCH 1/2] =?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 } From 4b6ed5200f829fd4c077cf7655d07c6f77c608b0 Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 5 Aug 2019 16:28:53 +0800 Subject: [PATCH 2/2] - fk --- business/jxstore/cms/store_sku.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index ac6fe8820..d2a3cad9f 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -384,7 +384,7 @@ func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, isFocus bo t2.comment, t2.category_id sku_category_id, t2.status sku_status, t4.created_at bind_created_at, t4.updated_at bind_updated_at, t4.last_operator bind_last_operator, t4.deleted_at bind_deleted_at, - t4.sub_store_id, t4.price bind_price, IF(t4.unit_price IS NOT NULL, t4.unit_price, t1.price) unit_price, t4.status bind_status, + t4.sub_store_id, t4.price bind_price, IF(t4.unit_price IS NOT NULL, t4.unit_price, t1.price) unit_price, t4.status store_sku_status, t4.ebai_id, t4.mtwm_id, t4.wsc_id, t4.wsc_id2, t4.jd_sync_status, t4.ebai_sync_status, t4.mtwm_sync_status, t4.wsc_sync_status, t4.auto_sale_at ` + sql