Tarea #1724 order/index buscar por alias
This commit is contained in:
parent
a319eed5f6
commit
7384fabec0
|
@ -96,7 +96,12 @@ module.exports = Self => {
|
|||
let where = buildFilter(ctx.args, (param, value) => {
|
||||
switch (param) {
|
||||
case 'search':
|
||||
return {'o.id': value};
|
||||
return /^\d+$/.test(value)
|
||||
? {'o.id': value}
|
||||
: {or: [
|
||||
{'c.name': {like: `%${value}%`}}
|
||||
]};
|
||||
// return {'o.id': value};
|
||||
case 'from':
|
||||
return {'o.date_send': {gte: value}};
|
||||
case 'to':
|
||||
|
|
Loading…
Reference in New Issue