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