From: Alexander Smirnov Date: Thu, 28 Dec 2023 08:52:00 +0000 (+0300) Subject: add cron/1c-check-1day during moving api1 to yii X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=0f599220461ce674c472a47b3f8ca394baad66df;p=yii-erp24%2F.git add cron/1c-check-1day during moving api1 to yii --- diff --git a/erp24/api1/actions/cron/OneCCheckOneDayAction.php b/erp24/api1/actions/cron/OneCCheckOneDayAction.php new file mode 100644 index 0000000..545428c --- /dev/null +++ b/erp24/api1/actions/cron/OneCCheckOneDayAction.php @@ -0,0 +1,33 @@ +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 09880cc..e1ecd4f 100644 --- a/erp24/api1/controllers/CronController.php +++ b/erp24/api1/controllers/CronController.php @@ -19,6 +19,7 @@ class CronController extends BaseController 'export-catalog' => \app\actions\cron\ExportCatalogAction::class, 'cloudpayments-region' => \app\actions\cron\CloudpaymentsRegionAction::class, 'bonus-users-sale-update' => \app\actions\cron\BonusUsersSaleUpdateAction::class, + '1c-check-1day' => \app\actions\cron\OneCCheckOneDayAction::class, ]; } }