Browse Source

bindAnixinStrucRes anxinyun

dev
巴林闲侠 2 years ago
parent
commit
014c9e3195
  1. 2
      api/app/lib/controllers/alarm/data.js
  2. 2
      api/app/lib/controllers/push/config.js

2
api/app/lib/controllers/alarm/data.js

@ -40,10 +40,8 @@ async function list (ctx) {
ctx, pepProjectId, keywordTarget, keyword ctx, pepProjectId, keywordTarget, keyword
}) })
let whereOption = [] let whereOption = []
// ! 1 开发临时增加
if (anxinStruc.length) { if (anxinStruc.length) {
const anxinStrucIds = anxinStruc.map(a => a.strucId) const anxinStrucIds = anxinStruc.map(a => a.strucId)
// ! 开发临时注释
whereOption.push(`alarms.StructureId IN (${anxinStrucIds.join(",")})`) whereOption.push(`alarms.StructureId IN (${anxinStrucIds.join(",")})`)
if (groupId) { if (groupId) {

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

@ -34,7 +34,7 @@ async function list (ctx) {
if (keywordTarget == 'tactics') { if (keywordTarget == 'tactics') {
findOption.where.name = { $like: `%${keyword}%` } findOption.where.name = { $like: `%${keyword}%` }
} else if (keywordTarget == 'struc') { } else if (keywordTarget == 'struc') {
let bindAnixinStrucRes = await clickHouse.projectManage.query(` let bindAnixinStrucRes = await clickHouse.anxinyun.query(`
SELECT id, name FROM t_structure SELECT id, name FROM t_structure
WHERE name LIKE '%${keyword}%' WHERE name LIKE '%${keyword}%'
`).toPromise() `).toPromise()

Loading…
Cancel
Save