fix: 修复关键字查询bug

This commit is contained in:
xiaojunnuo
2024-11-20 10:46:05 +08:00
parent 4955fcd12a
commit fab66606b3

View File

@@ -37,7 +37,7 @@ export class PipelineController extends CrudController<PipelineService> {
const buildQuery = qb => {
if (title) {
qb.andWhere('title like :title', { title: `%${title}%` }).orWhere('content like :content', { content: `%${title}%` });
qb.andWhere('(title like :title or content like :content)', { title: `%${title}%`, content: `%${title}%` });
}
};
if (!body.sort || !body.sort?.prop) {