Browse Source

feat:fix bugs

dev
zhaobing’ 1 year ago
parent
commit
b1c44b6b3e
  1. 9
      api/app/lib/controllers/project/bind.js

9
api/app/lib/controllers/project/bind.js

@ -14,15 +14,16 @@ async function bindAnxin2pep (ctx) {
let bindId_ = bindId let bindId_ = bindId
const now = moment() const now = moment()
let storageData = { let storageData = {
name, pepProjectId, anxinProjectId, name, pepProjectId, anxinProjectId,
updateTime: now, mappingClass, updateTime: now, mappingClass,
del: false, 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 的项目 // 仅限已有 pepProjectId 的项目
const existRes = pepProjectId ? await models.ProjectCorrelation.findOne({ const existRes = pepProjectId ? await models.ProjectCorrelation.findOne({
where: Object.assign( where: Object.assign(

Loading…
Cancel
Save