code refactor

This commit is contained in:
MaysWind
2024-07-09 00:06:18 +08:00
parent a371058096
commit 3eac9af403
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -190,7 +190,7 @@ func (a *DataManagementsApi) getExportedFileContent(c *core.Context, fileType st
return nil, "", errs.ErrOperationFailed
}
tagIndexs, err := a.tags.GetAllTagIdsOfAllTransactions(c, uid)
tagIndexs, err := a.tags.GetAllTagIdsMapOfAllTransactions(c, uid)
if err != nil {
log.ErrorfWithRequestId(c, "[data_managements.ExportDataHandler] failed to get tag index for user \"uid:%d\", because %s", uid, err.Error())
+1 -1
View File
@@ -628,7 +628,7 @@ func (l *UserDataCli) getUserEssentialData(uid int64, username string) (accountM
tagMap = l.tags.GetTagMapByList(tags)
tagIndexs, err = l.tags.GetAllTagIdsOfAllTransactions(nil, uid)
tagIndexs, err = l.tags.GetAllTagIdsMapOfAllTransactions(nil, uid)
if err != nil {
log.BootErrorf("[user_data.getUserEssentialData] failed to get tag index for user \"%s\", because %s", username, err.Error())
+2 -2
View File
@@ -116,8 +116,8 @@ func (s *TransactionTagService) GetMaxDisplayOrder(c *core.Context, uid int64) (
}
}
// GetAllTagIdsOfAllTransactions returns all transaction tag ids
func (s *TransactionTagService) GetAllTagIdsOfAllTransactions(c *core.Context, uid int64) (map[int64][]int64, error) {
// GetAllTagIdsMapOfAllTransactions returns all transaction tag ids map
func (s *TransactionTagService) GetAllTagIdsMapOfAllTransactions(c *core.Context, uid int64) (map[int64][]int64, error) {
if uid <= 0 {
return nil, errs.ErrUserIdInvalid
}