修复定时任务状态筛选

This commit is contained in:
whyour
2023-03-02 23:16:18 +08:00
parent 67bc305950
commit 3b9a4f0834
7 changed files with 632 additions and 128 deletions
+5 -2
View File
@@ -245,8 +245,11 @@ export default class CronService {
const filterKeys: any = Object.keys(filterQuery);
for (const key of filterKeys) {
let q: any = {};
if (filterKeys[key]) {
q[key] = filterKeys[key];
if (!filterQuery[key]) continue;
if (key === 'status' && filterQuery[key].includes(2)) {
q = { [Op.or]: [{ [key]: filterQuery[key] }, { isDisabled: 1 }] };
} else {
q[key] = filterQuery[key];
}
query[Op.and].push(q);
}