From 0a8e9ad4f0bc4e7aa75353a208c40b2fe2462ea6 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Wed, 10 Aug 2022 15:04:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8E=A8=E9=80=81=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/app/lib/schedule/cameraStatePush.js | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/code/VideoAccess-VCMP/api/app/lib/schedule/cameraStatePush.js b/code/VideoAccess-VCMP/api/app/lib/schedule/cameraStatePush.js index d566936..2446ea8 100644 --- a/code/VideoAccess-VCMP/api/app/lib/schedule/cameraStatePush.js +++ b/code/VideoAccess-VCMP/api/app/lib/schedule/cameraStatePush.js @@ -127,12 +127,12 @@ module.exports = function (app, opts) { let text = `【${corUser[0].username}】账号下的设备,截止【${moment(timeNow).format('MM月DD日 HH时mm分')}】,有${offArr.length}个设备掉线:\n` text += offArr.map(o => `【${o.name}】于【${moment(o.time).format('MM月DD日 HH时mm分')}】掉线,`).join('\n') text += `\n请及时处理!` - // await pushByEmail({ - // email: receiver, - // title: '尚视设备离线通知', - // text, - // }) - // await models.CameraStatusPushLog.create({ ...logData, pushWay: 'email', noticeWay: ['offline'], camera: offArr.map(o => o.cameraId) }) + await pushByEmail({ + email: receiver, + title: '尚视设备离线通知', + text, + }) + await models.CameraStatusPushLog.create({ ...logData, pushWay: 'email', noticeWay: ['offline'], camera: offArr.map(o => o.cameraId) }) } else if (c.pushWay == 'phone') { // 短信 let templateParam = { @@ -196,12 +196,12 @@ module.exports = function (app, opts) { let text = `【${corUser[0].username}】账号下的设备:\n` text += onArr.map(o => `【${o.name}】于【${moment(o.offTime).format('MM月DD日HH时mm分')}】掉线,【${moment(o.time).format('MM月DD日HH时mm分')}】已恢复`).join('\n') - // await pushByEmail({ - // email: receiver, - // title: '尚视设备上线通知', - // text, - // }) - // await models.CameraStatusPushLog.create({ ...logData, pushWay: 'email', noticeWay: ['online'], camera: onArr.map(o => o.cameraId) }) + await pushByEmail({ + email: receiver, + title: '尚视设备上线通知', + text, + }) + await models.CameraStatusPushLog.create({ ...logData, pushWay: 'email', noticeWay: ['online'], camera: onArr.map(o => o.cameraId) }) } else if (c.pushWay == 'phone') { // 短信 // let text = `【${corUser[0].username}】账号下的`