fix: 网元版本函数优化
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user