support data export

This commit is contained in:
MaysWind
2021-01-02 02:04:38 +08:00
parent 102c945aa0
commit 7d3e05c548
24 changed files with 515 additions and 42 deletions
+11
View File
@@ -321,3 +321,14 @@ func (s *AccountService) DeleteAccount(uid int64, accountId int64) error {
return err
})
}
// GetAccountMapByList returns an account map by a list
func (s *AccountService) GetAccountMapByList(accounts []*models.Account) map[int64]*models.Account {
accountMap := make(map[int64]*models.Account)
for i := 0; i < len(accounts); i++ {
account := accounts[i]
accountMap[account.AccountId] = account
}
return accountMap
}