fix(salesFilter): search by ticket id
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
8be7f9153e
commit
483a67e8b5
|
@ -133,6 +133,10 @@ module.exports = Self => {
|
||||||
|
|
||||||
const where = buildFilter(ctx.args, (param, value) => {
|
const where = buildFilter(ctx.args, (param, value) => {
|
||||||
switch (param) {
|
switch (param) {
|
||||||
|
case 'search':
|
||||||
|
return /^\d+$/.test(value)
|
||||||
|
? {'t.id': {inq: value}}
|
||||||
|
: {'t.nickname': {like: `%${value}%`}};
|
||||||
case 'from':
|
case 'from':
|
||||||
return {'t.shipped': {gte: value}};
|
return {'t.shipped': {gte: value}};
|
||||||
case 'to':
|
case 'to':
|
||||||
|
|
Loading…
Reference in New Issue