|
@ -292,19 +292,14 @@ export class OrderService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (types) { |
|
|
if (types) { |
|
|
where.OR = types.map((type) => { |
|
|
where.type = { in: types }; |
|
|
return { |
|
|
|
|
|
type: { |
|
|
|
|
|
equals: type |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (withExcludedAccounts === false) { |
|
|
if (withExcludedAccounts === false) { |
|
|
where.Account = { |
|
|
where.OR = [ |
|
|
NOT: { isExcluded: true } |
|
|
{ Account: null }, |
|
|
}; |
|
|
{ Account: { NOT: { isExcluded: true } } } |
|
|
|
|
|
]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const [orders, count] = await Promise.all([ |
|
|
const [orders, count] = await Promise.all([ |
|
|