Selaa lähdekoodia

预警服务增加测试api

kevin_zhangl 2 vuotta sitten
vanhempi
commit
f94d94ce44
1 muutettua tiedostoa jossa 7 lisäystä ja 3 poistoa
  1. 7 3
      frontendApi/modules/v1/controllers/SiteController.php

+ 7 - 3
frontendApi/modules/v1/controllers/SiteController.php

@@ -7,6 +7,7 @@
  */
 namespace frontendApi\modules\v1\controllers;
 
+use common\helpers\Alarm;
 use common\helpers\Cache;
 use common\helpers\LoggerTool;
 use common\helpers\snowflake\PageSnowFake;
@@ -373,9 +374,12 @@ class SiteController extends BaseController
 
     public function actionSendNotify()
     {
-        $message = Yii::$app->request->get('message', '收到信息了');
-        $data = ['message' => $message];
+        Alarm::reportAlarm([
+            'stance' => 1,
+            'brand' => 'OTA',
+            'message' => '预警信息测试',
+        ]);
 
-        return static::notice($data);
+        return static::notice();
     }
 }