From: fomichev Date: Mon, 5 May 2025 13:21:48 +0000 (+0300) Subject: Отправка заказов в лог на проде X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=4b285932f832db118deb9ed158356e05caa82fb6;p=erp24_rep%2Fyii-erp24%2F.git Отправка заказов в лог на проде --- diff --git a/erp24/api2/controllers/DataController.php b/erp24/api2/controllers/DataController.php index 05a75bd2..7160e7d5 100644 --- a/erp24/api2/controllers/DataController.php +++ b/erp24/api2/controllers/DataController.php @@ -268,6 +268,15 @@ class DataController extends BaseController file_put_contents(self::OUT_DIR . '/request_' . $jsonId . '.json', PHP_EOL . $json); file_put_contents(self::getPathJson() . '/request_' . $jsonId . '.json', PHP_EOL . $json); + if (!TelegramService::isDevEnv()) { + $mess['line'][] = __LINE__; + $newOrdersArray = $this->getMarketplaceOrders(); + if (!empty($newOrdersArray)) { + $mess['line'][] = __LINE__; + $mess['create_orders'] = $newOrdersArray; + } + $mess['line'][] = __LINE__; + } LogService::apiDataLogs(1, json_encode($mess, JSON_UNESCAPED_UNICODE), $jsonId); }