From e37d0ac53b46cceceeb58b1b27eb46df02488832 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Wed, 31 Aug 2022 10:57:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=A2=91=E7=8E=87=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../script/1.3.1/data/1_sync_camera_data/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/VideoAccess-VCMP/script/1.3.1/data/1_sync_camera_data/index.js b/code/VideoAccess-VCMP/script/1.3.1/data/1_sync_camera_data/index.js index 6b4631b..ab4dcd6 100644 --- a/code/VideoAccess-VCMP/script/1.3.1/data/1_sync_camera_data/index.js +++ b/code/VideoAccess-VCMP/script/1.3.1/data/1_sync_camera_data/index.js @@ -72,6 +72,7 @@ try { let beloneSecretId = null let serialUnlegal = false for (let s of secretRes) { + let start = (new Date()).getTime(); console.log(`当前查询账号key ${s.key}`); if (!s.newToken) { const tokenRes = await request.post(`${yingshiHost}lapp/token/get`).query({ @@ -89,6 +90,10 @@ try { } } + while (((new Date()).getTime() - start) < 3000) {//限制频率 + continue; + } + // 检测设备所属 const cameraState = await request.post(`${yingshiHost}lapp/device/info`).query({ accessToken: s.newToken, From 818fabc1e3656c7ade03de11b494608b268bffa8 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Wed, 31 Aug 2022 14:41:15 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B3=A8=E9=87=8Acamera=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js index 07dcae8..dd28cf2 100644 --- a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js +++ b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js @@ -12,7 +12,7 @@ async function getCameraProject (ctx, next) { let findOption = { attributes: { exclude: ['delete', 'recycleTime',] }, where: { - createUserId: userId, + // createUserId: userId, recycleTime: null, delete: false },