+8
-1
@@ -5,7 +5,9 @@ import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -42,7 +44,12 @@ public class ExtendedColumnDefinitionService
|
||||
predicate = predicate.and(qExtendedColumnDefinition.columnDesc.containsIgnoreCase(searchColumnDesc));
|
||||
}
|
||||
|
||||
return repository.findAll(predicate, pageable);
|
||||
Pageable orderedPageable = PageRequest.of(
|
||||
pageable.getPageNumber(),
|
||||
pageable.getPageSize(),
|
||||
Sort.by(Sort.Order.asc("orderSeq"), Sort.Order.asc("columnName")));
|
||||
|
||||
return repository.findAll(predicate, orderedPageable);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user