From 3b01d48a993cb6309decb06fa36e49cd60f58670 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Fri, 26 Jul 2024 18:30:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BD=91=E5=85=83=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=A4=87=E4=BB=BD=E5=88=97=E8=A1=A8=E6=94=AF=E6=8C=81=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2=EF=BC=8C=E6=8C=89?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E9=99=8D=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../network_element/repository/ne_config_backup.impl.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/network_element/repository/ne_config_backup.impl.go b/src/modules/network_element/repository/ne_config_backup.impl.go index 6a82d748..17331822 100644 --- a/src/modules/network_element/repository/ne_config_backup.impl.go +++ b/src/modules/network_element/repository/ne_config_backup.impl.go @@ -68,7 +68,7 @@ func (r *NeConfigBackupImpl) SelectPage(query map[string]any) map[string]any { params = append(params, strings.Trim(v.(string), " ")) } if v, ok := query["name"]; ok && v != "" { - conditions = append(conditions, "name like concat(?, '%')") + conditions = append(conditions, "name like concat(concat('%', ?), '%')") params = append(params, strings.Trim(v.(string), " ")) } @@ -99,7 +99,7 @@ func (r *NeConfigBackupImpl) SelectPage(query map[string]any) map[string]any { // 分页 pageNum, pageSize := repo.PageNumSize(query["pageNum"], query["pageSize"]) - pageSql := " limit ?,? " + pageSql := " order by id desc limit ?,? " params = append(params, pageNum*pageSize) params = append(params, pageSize)