fixed
This commit is contained in:
parent
927ab3bc8b
commit
c92d3c7e64
|
@ -26,8 +26,6 @@ class DataCollectController extends BaseApiController
|
|||
if(!$parmas || !isset($parmas['username']) || $parmas['username']==''){
|
||||
return $this->fail('参数错误');
|
||||
}
|
||||
$payload= json_decode($parmas['payload'], true);
|
||||
|
||||
$user = User::where('account', $parmas['username'])->find();
|
||||
|
||||
$device = explode('_', $parmas['topic']); // 命名规则:camera_deviceid deviceid为设备主键id
|
||||
|
@ -39,7 +37,7 @@ class DataCollectController extends BaseApiController
|
|||
|
||||
// mqtt服务端 消息发布事件
|
||||
if ($parmas['event'] == 'message.publish') {
|
||||
|
||||
$payload= json_decode($parmas['payload'], true);
|
||||
$data = [
|
||||
'user_id' => $user['id'],
|
||||
'land_id' => $landId,
|
||||
|
|
Loading…
Reference in New Issue