From: Alexander Smirnov Date: Wed, 27 Dec 2023 14:13:35 +0000 (+0300) Subject: add cron/custom-1c-cron during moving api1 to yii X-Git-Tag: 1.1~195^2~6 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=a31654dd00c9783ae364c85a74ea5ec5c1674aee;p=erp24_rep%2Fyii-erp24%2F.git add cron/custom-1c-cron during moving api1 to yii --- diff --git a/erp24/api1/actions/cron/Custom1cCronAction.php b/erp24/api1/actions/cron/Custom1cCronAction.php new file mode 100644 index 00000000..32d9fcaa --- /dev/null +++ b/erp24/api1/actions/cron/Custom1cCronAction.php @@ -0,0 +1,35 @@ +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 56ae34c5..0eb2d201 100644 --- a/erp24/api1/controllers/CronController.php +++ b/erp24/api1/controllers/CronController.php @@ -14,6 +14,7 @@ class CronController extends BaseController 'cloudpayments' => \app\actions\cron\CloudPaymentsAction::class, 'domru-cams' => \app\actions\cron\DomRuCamsAction::class, '1c-sellers' => \app\actions\cron\OneCSellersAction::class, + 'custom-1c-cron' => \app\actions\cron\Custom1cCronAction::class, ]; } }