fix: 网元配置备份列表支持名称模糊查询,按最新降序
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user