Commit 20706ea9 authored by nanahira's avatar nanahira

update search conditions

parent 4b8afe00
Pipeline #42161 passed with stages
in 3 minutes and 27 seconds
......@@ -64,7 +64,11 @@ export class WhitelistAccount extends IdBase() {
@QueryCondition((obj, qb, entityName, key) => {
if (obj[key] === 1) {
qb.andWhere(`${entityName}.enabled = TRUE`)
.orderBy('RANDOM()');
.andWhere(`${entityName}.refId IS NULL`)
.andWhere(`${entityName}.account IS NOT NULL`)
.andWhere(`LENGTH(${entityName}.account) > 0`)
.addSelect('RANDOM()', 'rand')
.orderBy('rand')
}
})
random: number;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment