示例#1
0
  @Override
  public Admin get(String username) {
    AdminExample example = new AdminExample();
    AdminExample.Criteria criteria = example.createCriteria();
    criteria.andUsernameEqualTo(username);

    List<Admin> list = adminMapper.selectByExample(example);

    return list.isEmpty() ? null : list.get(0);
  }
示例#2
0
 @Override
 public List<Admin> getAll() {
   return adminMapper.selectByExample(null);
 }