作者 yangfu

app files sort by name

@@ -6,6 +6,7 @@ import ( @@ -6,6 +6,7 @@ import (
6 "gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/infrastructure/api/authlib" 6 "gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/infrastructure/api/authlib"
7 "gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/infrastructure/api/bytelib" 7 "gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/infrastructure/api/bytelib"
8 "path/filepath" 8 "path/filepath"
  9 + "sort"
9 "strings" 10 "strings"
10 "time" 11 "time"
11 12
@@ -311,6 +312,9 @@ func (fileService *FileService) SearchAppFile(ctx *domain.Context, listFileQuery @@ -311,6 +312,9 @@ func (fileService *FileService) SearchAppFile(ctx *domain.Context, listFileQuery
311 files = append(files, file) 312 files = append(files, file)
312 } 313 }
313 } 314 }
  315 + sort.SliceStable(files, func(i, j int) bool {
  316 + return files[i].Name < files[j].Name
  317 + })
314 apps = append(apps, &dto.AppDto{ 318 apps = append(apps, &dto.AppDto{
315 AppId: app.AppId, 319 AppId: app.AppId,
316 AppKey: app.AppKey, 320 AppKey: app.AppKey,