fix: 网元版本函数优化

This commit is contained in:
TsMask
2024-04-11 17:12:37 +08:00
parent ebd02cb3e9
commit ca0f047f22
4 changed files with 8 additions and 8 deletions

View File

@@ -76,8 +76,8 @@ func (r *NeVersionImpl) SelectPage(query map[string]any) map[string]any {
conditions = append(conditions, "version like concat(?, '%')")
params = append(params, strings.Trim(v.(string), " "))
}
if v, ok := query["filePath"]; ok && v != "" {
conditions = append(conditions, "file_path like concat(?, '%')")
if v, ok := query["path"]; ok && v != "" {
conditions = append(conditions, "path like concat(?, '%')")
params = append(params, strings.Trim(v.(string), " "))
}
@@ -108,7 +108,7 @@ func (r *NeVersionImpl) SelectPage(query map[string]any) map[string]any {
// 分页
pageNum, pageSize := repo.PageNumSize(query["pageNum"], query["pageSize"])
pageSql := " limit ?,? "
pageSql := " order by update_time desc limit ?,? "
params = append(params, pageNum*pageSize)
params = append(params, pageSize)