标签:ide style ret rand sele tar dex gen creat
用法
@Override public PageResult findPage(TbBrand brand, int pageNum, int pageSize) { PageHelper.startPage(pageNum, pageSize);//分页 TbBrandExample example=new TbBrandExample(); Criteria criteria = example.createCriteria(); if(brand!=null){ if(brand.getName()!=null && brand.getName().length()>0){ criteria.andNameLike("%"+brand.getName()+"%"); } if(brand.getFirstChar()!=null && brand.getFirstChar().length()>0){ criteria.andFirstCharLike("%"+brand.getFirstChar()+"%"); } } Page<TbBrand> page = (Page<TbBrand>) brandMapper.selectByExample(example); return new PageResult(page.getTotal(), page.getResult()); }
标签:ide style ret rand sele tar dex gen creat
原文地址:https://www.cnblogs.com/duanwandao/p/9975624.html