From ad796d34158859af256881920d0850b297928219 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Thu, 20 Mar 2025 13:03:54 +0300 Subject: [PATCH] =?utf8?q?[ERP-326]=20=D0=B8=D0=B7=20afterSave?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/records/MarketplaceOrders.php | 8 ++++++++ erp24/scripts/tasks/task_35_new_order_to_telegram.php | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/erp24/records/MarketplaceOrders.php b/erp24/records/MarketplaceOrders.php index 27b36090..47d7523e 100644 --- a/erp24/records/MarketplaceOrders.php +++ b/erp24/records/MarketplaceOrders.php @@ -106,6 +106,14 @@ class MarketplaceOrders extends \yii\db\ActiveRecord ]; } + public function afterSave($insert, $changedAttributes) { + parent::afterSave($insert, $changedAttributes); + + Yii::$app->queue->push(new \yii_app\jobs\SendTelegramTestMessageJob([ + 'message' => "Тестовое сообщение для https://tracker.yandex.ru/ERP-326 из afterSave " . $this->guid + ])); + } + public function getStore() { return $this->hasOne(CityStore::class, ['id' => 'store_id']); diff --git a/erp24/scripts/tasks/task_35_new_order_to_telegram.php b/erp24/scripts/tasks/task_35_new_order_to_telegram.php index 6381253f..cd1e2893 100644 --- a/erp24/scripts/tasks/task_35_new_order_to_telegram.php +++ b/erp24/scripts/tasks/task_35_new_order_to_telegram.php @@ -31,7 +31,7 @@ $infoText = ''; $description = ''; $result = 0; -$enable = true; +$enable = false; $start = false; $force = true; -- 2.39.5