make tags of exported transaction data in the same order as they displayed in transaction

This commit is contained in:
MaysWind
2024-09-09 01:34:38 +08:00
parent 00c8259bd0
commit ee52db3f7c
3 changed files with 23 additions and 0 deletions
+6
View File
@@ -9,6 +9,7 @@ import (
"github.com/mayswind/ezbookkeeping/pkg/datastore"
"github.com/mayswind/ezbookkeeping/pkg/errs"
"github.com/mayswind/ezbookkeeping/pkg/models"
"github.com/mayswind/ezbookkeeping/pkg/utils"
"github.com/mayswind/ezbookkeeping/pkg/uuid"
)
@@ -440,5 +441,10 @@ func (s *TransactionTagService) GetGroupedTransactionTagIds(tagIndexes []*models
transactionTagIds = append(transactionTagIds, tagIndex.TagId)
allTransactionTagIds[tagIndex.TransactionId] = transactionTagIds
}
for _, tagIds := range allTransactionTagIds {
utils.Int64Sort(tagIds)
}
return allTransactionTagIds
}