Browse Source

获取流 同时获取备注

release_0.0.2
巴林闲侠 3 years ago
parent
commit
f05ade2b91
  1. 4
      code/VideoAccess-VCMP/api/.vscode/launch.json
  2. 12
      code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js

4
code/VideoAccess-VCMP/api/.vscode/launch.json

@ -23,8 +23,8 @@
"--godUrl https://restapi.amap.com/v3", "--godUrl https://restapi.amap.com/v3",
"--godKey 21c2d970e1646bb9a795900dd00093ce", "--godKey 21c2d970e1646bb9a795900dd00093ce",
"--mqttVideoServer mqtt://10.8.30.71:30883", "--mqttVideoServer mqtt://10.8.30.71:30883",
// "--iotVideoServerUrl http://221.230.55.27:8081", "--iotVideoServerUrl http://221.230.55.27:8081",
"--iotVideoServerUrl http://10.8.30.59:8080", // "--iotVideoServerUrl http://10.8.30.59:8080",
"--cameraPlayWsHost ws://221.230.55.27:8081", "--cameraPlayWsHost ws://221.230.55.27:8081",
"--cameraPlayHttpFlvHost http://221.230.55.27:2020", "--cameraPlayHttpFlvHost http://221.230.55.27:2020",
"--cameraPlayHlsHost http://221.230.55.27:8081", "--cameraPlayHlsHost http://221.230.55.27:8081",

12
code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js

@ -120,7 +120,11 @@ async function getNvrSteam (ctx) {
attributes: ['id', 'name', 'serialNo', 'cloudControl'], attributes: ['id', 'name', 'serialNo', 'cloudControl'],
where: { where: {
nvrId: nvrRes.id nvrId: nvrRes.id
} },
include: [{
model: models.CameraRemark,
attributes: ['remark']
}],
}) })
const cameraRes = await getGbCameraLevel3ByStreamId({ streamId }) const cameraRes = await getGbCameraLevel3ByStreamId({ streamId })
@ -417,7 +421,11 @@ async function getCascadeSteam (ctx) {
attributes: ['id', 'name', 'serialNo'], attributes: ['id', 'name', 'serialNo'],
where: { where: {
serialNo: { $in: allStreamid } serialNo: { $in: allStreamid }
} },
include: [{
model: models.CameraRemark,
attributes: ['remark']
}],
}) })
for (let c of cameraRes) { for (let c of cameraRes) {

Loading…
Cancel
Save