mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 08:44:25 +08:00
data management page shows all user data statistics
This commit is contained in:
@@ -32,6 +32,17 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
// GetTotalTransactionCountByUid returns total transaction count of user
|
||||
func (s *TransactionService) GetTotalTransactionCountByUid(uid int64) (int64, error) {
|
||||
if uid <= 0 {
|
||||
return 0, errs.ErrUserIdInvalid
|
||||
}
|
||||
|
||||
count, err := s.UserDataDB(uid).Where("uid=? AND deleted=?", uid, false).Count(&models.Transaction{})
|
||||
|
||||
return count, err
|
||||
}
|
||||
|
||||
// GetAllTransactions returns all transactions
|
||||
func (s *TransactionService) GetAllTransactions(uid int64, pageCount int32, noDuplicated bool) ([]*models.Transaction, error) {
|
||||
maxTransactionTime := utils.GetMaxTransactionTimeFromUnixTime(time.Now().Unix())
|
||||
|
||||
Reference in New Issue
Block a user