perf: 流水线支持名称模糊查询

This commit is contained in:
xiaojunnuo
2024-08-04 02:35:45 +08:00
parent a9717b9a0d
commit 59897c4cea
14 changed files with 157 additions and 28 deletions

View File

@@ -118,10 +118,9 @@ export abstract class BaseService<T> {
}
const qb = this.getRepository().createQueryBuilder('main');
if (order && order.prop) {
qb.orderBy('main.' + order.prop, order.asc ? 'ASC' : 'DESC');
} else {
qb.orderBy('id', 'DESC');
qb.addOrderBy('main.' + order.prop, order.asc ? 'ASC' : 'DESC');
}
qb.addOrderBy('id', 'DESC');
qb.offset(page.offset).limit(page.limit);
//根据bean query
if (query) {