sqlx
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user