diff --git a/app/listener/ProductCreate.php b/app/listener/ProductCreate.php index 437b1c01..572a3a09 100644 --- a/app/listener/ProductCreate.php +++ b/app/listener/ProductCreate.php @@ -25,6 +25,12 @@ class ProductCreate return false; } + // 根据支持同步到云商的商户进行同步操作 + $syncMerArray = Db::name('MerchantType')->where('is_sync_prod', 1)->column('mer_type_id'); + if (!in_array($merchant['type_id'], $syncMerArray)) { + return false; + } + //市级云仓 $cityMerchant = Db::name('merchant')->where('status', 1)->where('mer_state', 1)->where('category_id', $merchant['category_id'])->where('type_id', $typePlatformId)->find(); if ($cityMerchant) {