|
@ -15,6 +15,14 @@ function searchMeta(opts) { |
|
|
where['$or'] = [{ name: { $iLike: `%${keywords}%` } } |
|
|
where['$or'] = [{ name: { $iLike: `%${keywords}%` } } |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
|
|
|
const resourceCatalogOrganization = { |
|
|
|
|
|
model: models.ResourceCatalog, |
|
|
|
|
|
attributes: ['id', 'name'], |
|
|
|
|
|
include: [{ |
|
|
|
|
|
model: models.Organization, |
|
|
|
|
|
attributes: ['id', 'name'], |
|
|
|
|
|
}] |
|
|
|
|
|
} |
|
|
const findObj = { |
|
|
const findObj = { |
|
|
include: [ |
|
|
include: [ |
|
|
{ |
|
|
{ |
|
@ -22,7 +30,9 @@ function searchMeta(opts) { |
|
|
include: [{ |
|
|
include: [{ |
|
|
model: models.Tag, |
|
|
model: models.Tag, |
|
|
}] |
|
|
}] |
|
|
}], |
|
|
}, |
|
|
|
|
|
resourceCatalogOrganization |
|
|
|
|
|
], |
|
|
where: { |
|
|
where: { |
|
|
...where, |
|
|
...where, |
|
|
type: { $in: ['表', '库'] } |
|
|
type: { $in: ['表', '库'] } |
|
@ -35,7 +45,9 @@ function searchMeta(opts) { |
|
|
include: [{ |
|
|
include: [{ |
|
|
model: models.Tag, |
|
|
model: models.Tag, |
|
|
}] |
|
|
}] |
|
|
}], |
|
|
}, |
|
|
|
|
|
resourceCatalogOrganization |
|
|
|
|
|
], |
|
|
where: where |
|
|
where: where |
|
|
} |
|
|
} |
|
|
const findObj3 = { |
|
|
const findObj3 = { |
|
@ -45,7 +57,8 @@ function searchMeta(opts) { |
|
|
include: [{ |
|
|
include: [{ |
|
|
model: models.Tag, |
|
|
model: models.Tag, |
|
|
}] |
|
|
}] |
|
|
}], |
|
|
}, |
|
|
|
|
|
], |
|
|
where: where |
|
|
where: where |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|