2222-01-01 00:00:00临时下架一些门店的商品

This commit is contained in:
gazebo
2020-02-13 11:57:18 +08:00
committed by 苏尹岚
parent f78d71d191
commit 01fdf38fcf

View File

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