From a9ce108e9d02b70e1529e9fd8a6ef432ffb7fed1 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Wed, 6 Jul 2022 17:39:07 +0800 Subject: [PATCH] =?UTF-8?q?CameraRemark=20=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/app/lib/controllers/camera/create.js | 10 ++++++++-- .../api/app/lib/controllers/camera/index.js | 5 ++++- 2 files changed, 12 insertions(+), 3 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 f6394c9..965b071 100644 --- a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js +++ b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/create.js @@ -123,7 +123,10 @@ async function getNvrSteam (ctx) { }, include: [{ model: models.CameraRemark, - attributes: ['remark'] + attributes: ['remark'], + order: [ + ['id', 'DESC'] + ], }], }) @@ -424,7 +427,10 @@ async function getCascadeSteam (ctx) { }, include: [{ model: models.CameraRemark, - attributes: ['remark'] + attributes: ['remark'], + order: [ + ['id', 'DESC'] + ], }], }) 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 f8492cb..2c50b27 100644 --- a/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js +++ b/code/VideoAccess-VCMP/api/app/lib/controllers/camera/index.js @@ -33,7 +33,10 @@ async function getCameraProject (ctx, next) { attributes: ['token'] }, { model: models.CameraRemark, - attributes: ['remark'] + attributes: ['remark'], + order: [ + ['id', 'DESC'] + ], }], distinct: true }