Browse Source

fix 状态查询

dev
巴林闲侠 3 years ago
parent
commit
645c69fa44
  1. 11
      api/app/lib/controllers/push/config.js

11
api/app/lib/controllers/push/config.js

@ -9,16 +9,19 @@ async function list (ctx) {
const { utils: { anxinStrucIdRange, pomsProjectRange } } = ctx.app.fs
const { keyword, keywordTarget, alarmType, state, tactics, pomsProjectId } = ctx.query
let projectCorrelationWhere = {
del: false,
}
if (state == 'notYet') {
projectCorrelationWhere.pepProjectId = { $ne: null }
}
let findOption = {
where: {
del: false
},
include: [{
model: models.ProjectCorrelation,
where: {
del: false,
pepProjectId: state == 'notYet' ? { $ne: null } : undefined
},
where: projectCorrelationWhere,
required: true
}]
}

Loading…
Cancel
Save