Page<T> page = dao.findAll(getInputCondition(vo), pageRequest);
private Predicate getInputCondition(T vo) {
List<BooleanExpression> predicates = new ArrayList<>();
if (null != vo) {
if (!StringUtils.isEmpty(vo.getSkuNo())) {
predicates.add(QSkuInfo.skuInfo.skuNo.eq(vo.getSkuNo()));
}
}
return BooleanExpression.allOf(predicates.toArray(new
BooleanExpression[predicates.size()]));
}
when using findAll, either Predicate and sort are not passed, or there is no sorting.
how to sort a field on this basis