Exemplo n.º 1
0
 public List<AdminAccount> findAllByPage(PageQuery page) {
   AdminAccountExample example = new AdminAccountExample();
   Criteria criteria = example.createCriteria();
   criteria.andStatEqualTo(DataStatus.ENABLED);
   example.setOrderByClause(
       " create_time asc limit " + page.getStartNum() + ", " + page.getPageSize());
   return mapper.selectByExample(example);
 }
Exemplo n.º 2
0
 public List<AdminAccount> find(AdminAccountQuery query, PageQuery page) {
   AdminAccountExample example = new AdminAccountExample();
   Criteria criteria = example.createCriteria();
   criteria.andStatEqualTo(DataStatus.ENABLED);
   if (StringUtils.isNotEmpty(query.getAccountCode())) {
     criteria.andUserNameEqualTo(query.getAccountCode());
   }
   if (StringUtils.isNotEmpty(query.getRoleId())) {
     criteria.andRoleIdEqualTo(query.getRoleId());
   }
   example.setOrderByClause(
       " create_time asc limit " + page.getStartNum() + ", " + page.getPageSize());
   return mapper.selectByExample(example);
 }