From 01fdf38fcf498ed55a906c0dfa17f5ee4e55e5d4 Mon Sep 17 00:00:00 2001 From: gazebo Date: Thu, 13 Feb 2020 11:57:18 +0800 Subject: [PATCH] =?UTF-8?q?2222-01-01=2000:00:00=E4=B8=B4=E6=97=B6?= =?UTF-8?q?=E4=B8=8B=E6=9E=B6=E4=B8=80=E4=BA=9B=E9=97=A8=E5=BA=97=E7=9A=84?= =?UTF-8?q?=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sync_store_sku.go | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/business/jxstore/cms/sync_store_sku.go b/business/jxstore/cms/sync_store_sku.go index 926f6a20b..6fbdd5fed 100644 --- a/business/jxstore/cms/sync_store_sku.go +++ b/business/jxstore/cms/sync_store_sku.go @@ -31,12 +31,7 @@ const ( var ( subSensitiveWordRegexp = regexp.MustCompile(`[^\[\]\"\}]`) - // 2020-02-10美团要求下架所有猪肉 - meatCatMap = map[int]bool{ - 20: true, - 184: true, - 59: true, - } + specailAutoEnableAt = utils.Str2Time("2222-01-01 00:00:00") ) func CreateStoreCategoryByStoreSku(ctx *jxcontext.Context, vendorID, storeID int, vendorStoreID string, nameIDs, skuIDs []int) (err error) { @@ -385,10 +380,9 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag sku.VendorPrice = 0 } sku.MergedStatus = MergeSkuSaleStatusWithStoreOpTime(sku, storeDetail, now) - // 2020-02-10美团要求下架所有猪肉 - // if globals.IsMainProductEnv() && vendorID == model.VendorIDMTWM && meatCatMap[sku.NameCategoryID] { - // sku.MergedStatus = model.SkuStatusDontSale - // } + if vendorID == model.VendorIDMTWM && storeDetail.Status != model.StoreStatusOpened && storeDetail.AutoEnableAt.Sub(specailAutoEnableAt) == 0 && sku.MergedStatus == model.SkuStatusNormal { + sku.MergedStatus = model.SkuStatusDontSale + } var bareSku *partner.StoreSkuInfo isNeedReorder := false if isStoreSkuSyncNeedDelete(sku) {