本文整理汇总了Java中com.github.pagehelper.PageHelper.orderBy方法的典型用法代码示例。如果您正苦于以下问题:Java PageHelper.orderBy方法的具体用法?Java PageHelper.orderBy怎么用?Java PageHelper.orderBy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.github.pagehelper.PageHelper
的用法示例。
在下文中一共展示了PageHelper.orderBy方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTxs
import com.github.pagehelper.PageHelper; //导入方法依赖的package包/类
@Override
public List<TransactionLocalPo> getTxs(String address, int type, int pageNum, int pageSize) {
Searchable searchable = new Searchable();
if (type != 0) {
searchable.addCondition("b.type", SearchOperator.eq, type);
}
if (StringUtils.isNotBlank(address)) {
searchable.addCondition("a.address", SearchOperator.eq, address);
}
if (pageNum > 0 && pageSize > 0) {
PageHelper.startPage(pageNum, pageSize);
}
PageHelper.orderBy("block_height asc, create_time asc");
return getMapper().selectByAddress(searchable);
}
示例2: getRandomNodePoList
import com.github.pagehelper.PageHelper; //导入方法依赖的package包/类
@Override
public List<NodePo> getRandomNodePoList(int size, Set<String> keys) {
Searchable searchable = new Searchable();
PageHelper.startPage(1, 100);
PageHelper.orderBy("last_fail_time asc");
if (!keys.isEmpty()) {
searchable.addCondition("id", SearchOperator.notIn, keys);
}
searchable.addCondition("status", SearchOperator.eq, 0);
searchable.addCondition("last_fail_time", SearchOperator.lt, TimeService.currentTimeMillis() - TimeService.ONE_HOUR);
List<NodePo> list = getMapper().selectList(searchable);
if (list.size() <= size) {
return list;
} else {
Collections.shuffle(list);
}
return list.subList(0, size - 1);
}
示例3: getTxs
import com.github.pagehelper.PageHelper; //导入方法依赖的package包/类
@Override
public List<TransactionPo> getTxs(String address, int type, int pageNum, int pageSize) {
Searchable searchable = new Searchable();
if (type != 0) {
searchable.addCondition("b.type", SearchOperator.eq, type);
}
if (StringUtils.isNotBlank(address)) {
searchable.addCondition("a.address", SearchOperator.eq, address);
}
if (pageNum > 0 && pageSize > 0) {
PageHelper.startPage(pageNum, pageSize);
}
PageHelper.orderBy("block_height asc, create_time asc");
return getMapper().selectByAddress(searchable);
}
示例4: getAccountOutputs
import com.github.pagehelper.PageHelper; //导入方法依赖的package包/类
@Override
public List<UtxoOutputPo> getAccountOutputs(String address, byte status) {
Searchable searchable = new Searchable();
searchable.addCondition("status", SearchOperator.eq, status);
searchable.addCondition("address", SearchOperator.eq, address);
PageHelper.orderBy("value asc");
return getMapper().selectList(searchable);
}
示例5: getAllUnSpend
import com.github.pagehelper.PageHelper; //导入方法依赖的package包/类
@Override
public List<UtxoOutputPo> getAllUnSpend() {
Searchable searchable = new Searchable();
searchable.addCondition("status", SearchOperator.ne, 2);
PageHelper.orderBy("address asc, status asc, value asc");
return getMapper().selectList(searchable);
}
示例6: getAccountUnSpend
import com.github.pagehelper.PageHelper; //导入方法依赖的package包/类
@Override
public List<UtxoOutputPo> getAccountUnSpend(String address) {
Searchable searchable = new Searchable();
searchable.addCondition("status", SearchOperator.ne, 2);
searchable.addCondition("address", SearchOperator.eq, address);
PageHelper.orderBy("status asc, value asc");
return getMapper().selectList(searchable);
}
示例7: serchAPPInfoByPage
import com.github.pagehelper.PageHelper; //导入方法依赖的package包/类
@Override
public PageInfo<AppProtocolDto> serchAPPInfoByPage(AppProtocolModel model) throws Exception {
PageHelper.startPage(model.getPageNum(), model.getPageSize(), true, true);
PageHelper.orderBy(" create_time desc ");
AppProtocolDtoExample example = new AppProtocolDtoExample();
if(model.getAppName()!=null&&model.getAppName().length()>0){
example.or().andAppNameLike("%"+model.getAppName()+"%");
}
List<AppProtocolDto> list = appProtocolDtoMapper.selectByExample(example);
return new PageInfo<>(list);
}
示例8: searchOrderPage
import com.github.pagehelper.PageHelper; //导入方法依赖的package包/类
@Override
public PageInfo<AppOrdersModel> searchOrderPage(AppOrdersModel model) throws Exception {
PageHelper.startPage(model.getPageNum(), model.getPageSize(), true, true);
PageHelper.orderBy(" create_time desc ");
List<AppOrdersModel> list = extOrderMapper.searchOrderPage(model);
return new PageInfo<>(list);
}