2020-02-10美团要求下架所有猪肉

This commit is contained in:
gazebo
2020-02-10 14:56:39 +08:00
parent 7ba8a762fd
commit 527222a095
2 changed files with 21 additions and 9 deletions

View File

@@ -30,6 +30,13 @@ const (
var (
subSensitiveWordRegexp = regexp.MustCompile(`[^\[\]\"\}]`)
// 2020-02-10美团要求下架所有猪肉
meatCatMap = map[int]bool{
20: true,
184: true,
59: true,
}
)
func CreateStoreCategoryByStoreSku(ctx *jxcontext.Context, vendorID, storeID int, vendorStoreID string, nameIDs, skuIDs []int) (err error) {
@@ -378,6 +385,10 @@ 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
}
var bareSku *partner.StoreSkuInfo
isNeedReorder := false
if isStoreSkuSyncNeedDelete(sku) {