From f6ae29eccec875195fe097de5a00b858116e0931 Mon Sep 17 00:00:00 2001 From: dzl <786316265@qq.com> Date: Fri, 26 Sep 2025 15:56:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BD=A2=E5=8F=82=E5=BC=95?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/supplier.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/supplier.js b/routes/supplier.js index 16c345d..b56bfc8 100644 --- a/routes/supplier.js +++ b/routes/supplier.js @@ -224,7 +224,7 @@ router.get('/list', async (req, res) => { .where('user_type=?', 'supplier') .where('is_delete=?', false) if (name) { - userCountQuery.where('(username LIKE ? or phone LIKE ?)', name, name) + userCountQuery.where('(username LIKE ? or phone LIKE ?)', `%${name}%`, `%${name}%`) } const data = await userCountQuery.paginateWithCount(db, page, limit); return res.json(data)