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(