This commit is contained in:
2025-06-18 17:44:49 +08:00
parent b171122a32
commit 0878a4e6de
66 changed files with 2841 additions and 1423 deletions

View File

@@ -115,7 +115,17 @@ func (s *departmentService) All(ctx context.Context) ([]*system.Department, erro
}
func (s *departmentService) List(ctx context.Context, q dto.SearchDto) ([]*system.Department, int64, error) {
return s.repo.List(ctx, q)
count, err := s.repo.Count(ctx, q)
if err != nil {
return nil, 0, err
}
res, err := s.repo.List(ctx, q)
if err != nil {
return nil, 0, err
}
return res, count, nil
}
func (s *departmentService) RefreshCache(ctx context.Context) error {