其他分享
首页 > 其他分享> > jpaDSL分页,排序

jpaDSL分页,排序

作者:互联网


//排序
        JPAQuery<Customer> orderBy = customer.orderBy(QCustomer.qcustomer.createTime.desc());
        //分页
        JPAQuery<Customer> limit = orderBy.offset(customerInputListPCInputParam.getPage().longValue() * customerInputListPCInputParam.getSize().longValue())
                .limit(customerInputListPCInputParam.getSize().longValue()).fetchAll();

标签:orderBy,分页,longValue,customerInputListPCInputParam,getSize,limit,JPAQuery,排序,jpa
来源: https://www.cnblogs.com/Arborblog/p/16631822.html