From e1dd11c50eab8fb2c7d4761dec704dfe21ffb370 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Mon, 20 Jun 2022 14:45:06 +0800 Subject: [PATCH] =?UTF-8?q?sql=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/app/lib/controllers/camera/create.js | 4 ++-- code/VideoAccess-VCMP/script/0.0.1/0_init_db.sql | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js index 4292e72..ef67449 100644 --- a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js +++ b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js @@ -207,7 +207,7 @@ async function createNvrCamera (ctx) { name: c.name, sip: corCamera.sipip, cloudControl: c.cloudControl, - gbId: c.id, + gbId: corCamera.id, }) } else { createData.push({ @@ -220,7 +220,7 @@ async function createNvrCamera (ctx) { createTime: moment().format(), createUserId: userId, forbidden: false, - gbId: c.id, + gbId: corCamera.id, }) } } else { diff --git a/code/VideoAccess-VCMP/script/0.0.1/0_init_db.sql b/code/VideoAccess-VCMP/script/0.0.1/0_init_db.sql index eddd213..7506eb6 100644 --- a/code/VideoAccess-VCMP/script/0.0.1/0_init_db.sql +++ b/code/VideoAccess-VCMP/script/0.0.1/0_init_db.sql @@ -12,7 +12,7 @@ Target Server Version : 90515 File Encoding : 65001 - Date: 20/06/2022 11:01:09 + Date: 20/06/2022 14:41:32 */ @@ -150,7 +150,8 @@ CREATE TABLE "public"."camera" ( "nvr_id" int4, "model" varchar(128) COLLATE "pg_catalog"."default", "kind_id" int4, - "yingshi_secret_id" int4 + "yingshi_secret_id" int4, + "gb_id" int4 ) ; COMMENT ON COLUMN "public"."camera"."type" IS '设备类型:yingshi - 萤石;nvr - NVR摄像头;ipc - IPC 网络摄像头;cascade - 级联摄像头'; @@ -332,7 +333,7 @@ SELECT setval('"public"."camera_ability_bind_id_seq"', 35, true); -- ---------------------------- ALTER SEQUENCE "public"."camera_id_seq" OWNED BY "public"."camera"."id"; -SELECT setval('"public"."camera_id_seq"', 313, true); +SELECT setval('"public"."camera_id_seq"', 314, true); -- ---------------------------- -- Alter sequences owned by