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 { utils: { anxinStrucIdRange, pomsProjectRange } } = ctx.app.fs
const { keyword, keywordTarget, alarmType, state, tactics, pomsProjectId } = ctx.query const { keyword, keywordTarget, alarmType, state, tactics, pomsProjectId } = ctx.query
let projectCorrelationWhere = {
del: false,
}
if (state == 'notYet') {
projectCorrelationWhere.pepProjectId = { $ne: null }
}
let findOption = { let findOption = {
where: { where: {
del: false del: false
}, },
include: [{ include: [{
model: models.ProjectCorrelation, model: models.ProjectCorrelation,
where: { where: projectCorrelationWhere,
del: false,
pepProjectId: state == 'notYet' ? { $ne: null } : undefined
},
required: true required: true
}] }]
} }

Loading…
Cancel
Save