From 1d6656e472bbce79d2621c4a31da50fc08e14c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?zhaobing=E2=80=99?= Date: Wed, 18 Oct 2023 09:49:56 +0800 Subject: [PATCH] feat:fix bugs --- api/app/lib/controllers/project/bind.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/api/app/lib/controllers/project/bind.js b/api/app/lib/controllers/project/bind.js index 0a60da1..a3f71fe 100644 --- a/api/app/lib/controllers/project/bind.js +++ b/api/app/lib/controllers/project/bind.js @@ -19,11 +19,10 @@ async function bindAnxin2pep (ctx) { name, pepProjectId, anxinProjectId, updateTime: now, mappingClass, del: false, + maintenanceEnd:maintenancePeriod&&maintenancePeriod.length?maintenancePeriod[1]:null, + maintenanceStart:maintenancePeriod&&maintenancePeriod.length?maintenancePeriod[0]:null, } - if(maintenancePeriod&&maintenancePeriod.length){ - storageData.maintenanceEnd=maintenancePeriod[1] - storageData.maintenanceStart=maintenancePeriod[0] - } + // 仅限已有 pepProjectId 的项目 const existRes = pepProjectId ? await models.ProjectCorrelation.findOne({ where: Object.assign(