Skip to content

Commit 4448c9e

Browse files
export csv filters support
1 parent c2c5fb5 commit 4448c9e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/auth/user/UserService.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ func (impl UserServiceImpl) GetAllWithFilters(request *bean.FetchListingRequest)
954954
// default values will be used if not provided
955955
impl.userCommonService.SetDefaultValuesIfNotPresent(request, false)
956956
if request.ShowAll {
957-
response, err := impl.getAllDetailedUsers()
957+
response, err := impl.getAllDetailedUsers(request)
958958
if err != nil {
959959
impl.logger.Errorw("error in GetAllWithFilters", "err", err)
960960
return nil, err
@@ -1022,8 +1022,8 @@ func (impl UserServiceImpl) getUserResponse(model []repository.UserModel, totalC
10221022
return listingResponse, nil
10231023
}
10241024

1025-
func (impl *UserServiceImpl) getAllDetailedUsers() ([]bean.UserInfo, error) {
1026-
query := impl.userListingRepositoryQueryBuilder.GetQueryForAllUserWithAudit()
1025+
func (impl *UserServiceImpl) getAllDetailedUsers(req *bean.FetchListingRequest) ([]bean.UserInfo, error) {
1026+
query := impl.userListingRepositoryQueryBuilder.GetQueryForUserListingWithFilters(req)
10271027
models, err := impl.userRepository.GetAllExecutingQuery(query)
10281028
if err != nil {
10291029
impl.logger.Errorw("error in GetAllDetailedUsers", "err", err)

pkg/auth/user/repository/helper/UserRepositoryQueryBuilder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func (impl UserRepositoryQueryBuilder) GetQueryForUserListingWithFilters(req *be
3535
}
3636
}
3737

38-
if req.Size > 0 && !req.CountCheck {
38+
if req.Size > 0 && !req.ShowAll && !req.CountCheck {
3939
orderCondition += " limit " + strconv.Itoa(req.Size) + " offset " + strconv.Itoa(req.Offset) + ""
4040
}
4141
var query string

0 commit comments

Comments
 (0)