add 断开链接通知
This commit is contained in:
parent
7659cea767
commit
20e2e3c159
|
@ -1,13 +1,14 @@
|
|||
<?php
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\common\model\device\MonitorThreshold;
|
||||
use app\common\model\LandCollection;
|
||||
use Exception;
|
||||
use think\facade\Log;
|
||||
|
||||
class DataCollectController extends BaseApiController
|
||||
{
|
||||
public array $notNeedLogin = ['collect'];
|
||||
public array $notNeedLogin = ['collect', 'disabled'];
|
||||
// 种植数据采集
|
||||
public function collect()
|
||||
{
|
||||
|
@ -46,10 +47,21 @@ class DataCollectController extends BaseApiController
|
|||
];
|
||||
|
||||
LandCollection::create($data);
|
||||
|
||||
// 报警监测
|
||||
$monitorThreshold = MonitorThreshold::find()->toArray();
|
||||
|
||||
|
||||
return $this->success('接收成功', ['user_name'=>$parmas['username'], 'topic'=>$parmas['topic']]);
|
||||
} catch (Exception $e) {
|
||||
return $this->fail($e->getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function disabled()
|
||||
{
|
||||
$parmas = $this->request->post();
|
||||
Log::info(json_encode($parmas));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue