From 763a774625dee06a80c31ff58290168b2efd14f6 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Wed, 27 Dec 2023 17:06:53 +0300 Subject: [PATCH] add cron/1c-sellers during moving api1 to yii --- erp24/api1/actions/cron/OneCSellersAction.php | 34 +++++++++++++++++++ erp24/api1/controllers/CronController.php | 1 + 2 files changed, 35 insertions(+) create mode 100644 erp24/api1/actions/cron/OneCSellersAction.php diff --git a/erp24/api1/actions/cron/OneCSellersAction.php b/erp24/api1/actions/cron/OneCSellersAction.php new file mode 100644 index 00000000..c06ef69e --- /dev/null +++ b/erp24/api1/actions/cron/OneCSellersAction.php @@ -0,0 +1,34 @@ +db->createCommand()->insert('api_cron', [ + 'id' => 0, + 'date' => new Expression('NOW()'), + 'date_up' => new Expression('NOW()'), + 'status' => 0, + 'json_post' => $json_post, + 'request_id' => $req_id + ])->execute(); + + return $this->controller->asJson(['response' => $req_id]); + } +} \ No newline at end of file diff --git a/erp24/api1/controllers/CronController.php b/erp24/api1/controllers/CronController.php index e60d8f4f..56ae34c5 100644 --- a/erp24/api1/controllers/CronController.php +++ b/erp24/api1/controllers/CronController.php @@ -13,6 +13,7 @@ class CronController extends BaseController 'amo142' => \app\actions\cron\Amo142Action::class, 'cloudpayments' => \app\actions\cron\CloudPaymentsAction::class, 'domru-cams' => \app\actions\cron\DomRuCamsAction::class, + '1c-sellers' => \app\actions\cron\OneCSellersAction::class, ]; } } -- 2.39.5