Browse Source

安心云数据查询bug

release_0.0.2
yuan_yi 2 years ago
parent
commit
24c1294aad
  1. 6
      code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js
  2. 8
      code/VideoAccess-VCMP/api/app/lib/controllers/nvr/index.js

6
code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js

@ -62,7 +62,7 @@ async function getCameraProject (ctx, next) {
const axbindCameraRes = await ctx.app.fs.axyRequest.get('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } })
// 查对应创建者信息
const corUsers = await ctx.app.fs.authRequest.get(`user/${[...createUserIds].join(',')}/message`, { query: { token } })
const corUsers = await ctx.app.fs.authRequest.get(`user/${[...createUserIds].join(',') || -1}/message`, { query: { token } })
for (let { dataValues: camera } of cameraRes) {
const corBindCamera = axbindCameraRes.find(b => b.cameraId == camera.id)
@ -226,7 +226,9 @@ async function del (ctx) {
}
})
await ctx.app.fs.axyRequest.delete('vcmp/camera/project', { query: { token, cameraId: cameraId.join(',') } })
if (cameraId.length) {
await ctx.app.fs.axyRequest.delete('vcmp/camera/project', { query: { token, cameraId: cameraId.join(',') } })
}
ctx.status = 204;
} catch (error) {

8
code/VideoAccess-VCMP/api/app/lib/controllers/nvr/index.js

@ -140,8 +140,9 @@ async function del (ctx, next) {
nvrId,
}
})
await ctx.app.fs.axyRequest.delete('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } })
if(cameraIds.length){
await ctx.app.fs.axyRequest.delete('vcmp/camera/project', { query: { token, cameraId: cameraIds.join(',') } })
}
await transaction.commit();
ctx.status = 204;
@ -205,7 +206,8 @@ async function detail (ctx) {
camera: cameras,
createUser: {
namePresent: corUser[0].namePresent
}
},
accessWay: 'GB/T28181'
}
ctx.status = 200;

Loading…
Cancel
Save