code refactor
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user