From: Vladimir Fomichev Date: Mon, 6 Oct 2025 13:26:00 +0000 (+0300) Subject: Проверка на пустоту базы X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=7915c330b1c87dadb4e8a9a897c9cd336adb46d0;p=erp24_rep%2Fyii-erp24%2F.git Проверка на пустоту базы --- diff --git a/erp24/services/MarketplaceService.php b/erp24/services/MarketplaceService.php index 34c00bac..7e5e027c 100644 --- a/erp24/services/MarketplaceService.php +++ b/erp24/services/MarketplaceService.php @@ -34,6 +34,7 @@ use yii_app\records\MatrixErpProperty; use yii_app\records\Prices; use yii_app\records\Products1c; use yii_app\records\ProductsClass; +use yii_app\services\TelegramService; class MarketplaceService { @@ -1742,6 +1743,10 @@ class MarketplaceService return; } + if (TelegramService::isDevEnv() && MarketplaceFlowwowEmails::find()->count() === 0) { + return; + } + $exists = MarketplaceFlowwowEmails::find() ->where(['subject' => $subject, 'from' => $from, 'date' => $date]) ->exists();