Browse Source

查询应用巡检信息

dev
巴林闲侠 2 years ago
parent
commit
d4ae890a9f
  1. 2
      api/app/lib/controllers/alarm/app.js
  2. 2
      api/app/lib/index.js

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

@ -42,7 +42,7 @@ async function inspectionList (ctx) {
},
order: [['id', 'DESC']],
include: [{
model: models.ProjectApp,
model: models.App,
required: true,
where: appId ? {
id: appId

2
api/app/lib/index.js

@ -69,6 +69,8 @@ module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Seq
ProjectCorrelation.belongsToMany(App, { through: ProjectApp, foreignKey: 'projectId', otherKey: 'appId' });
App.belongsToMany(ProjectCorrelation, { through: ProjectApp, foreignKey: 'appId', otherKey: 'projectId' });
AppAlarm.belongsTo(App, { foreignKey: 'projectAppId', targetKey: 'id' });
App.hasMany(AppAlarm, { foreignKey: 'projectAppId', sourceKey: 'id' });
};

Loading…
Cancel
Save