@Test public void getAdminByName() throws Exception { }
public Admin getAdminByName(String name) { AdminExample adminExample = new AdminExample(); adminExample.or().andNameEqualTo(name); adminExample.setOrderByClause("id desc"); List<Admin> adminList = adminMapper.selectByExample(adminExample); if (adminList!=null && adminList.size()>0) return adminList.get(0); return null; }
AdminService { public Admin getAdminByName(String name) { AdminExample adminExample = new AdminExample(); adminExample.or().andNameEqualTo(name); adminExample.setOrderByClause("id desc"); List<Admin> adminList = adminMapper.selectByExample(adminExample); if (adminList!=null && adminList.size()>0) return adminList.get(0); return null; } }
AdminService { public Admin getAdminByName(String name) { AdminExample adminExample = new AdminExample(); adminExample.or().andNameEqualTo(name); adminExample.setOrderByClause("id desc"); List<Admin> adminList = adminMapper.selectByExample(adminExample); if (adminList!=null && adminList.size()>0) return adminList.get(0); return null; }  }
AdminService { public Admin getAdminByName(String name) { AdminExample adminExample = new AdminExample(); adminExample.or().andNameEqualTo(name); adminExample.setOrderByClause("id desc"); List<Admin> adminList = adminMapper.selectByExample(adminExample); if (adminList!=null && adminList.size()>0) return adminList.get(0); return null; }  TokenVo login(String name, String password); Admin getAdminByName(String name); boolean addAdmin(String name, String password, String phone, String realName ,Integer adminId); boolean resetPassword(Integer adminId, String password,String name); Admin getAdminById(Integer adminId); Page getUsers(AdminReq admin); }
AdminService { public Admin getAdminByName(String name) { AdminExample adminExample = new AdminExample(); adminExample.or().andNameEqualTo(name); adminExample.setOrderByClause("id desc"); List<Admin> adminList = adminMapper.selectByExample(adminExample); if (adminList!=null && adminList.size()>0) return adminList.get(0); return null; }  TokenVo login(String name, String password); Admin getAdminByName(String name); boolean addAdmin(String name, String password, String phone, String realName ,Integer adminId); boolean resetPassword(Integer adminId, String password,String name); Admin getAdminById(Integer adminId); Page getUsers(AdminReq admin); static String INIT_PWD; }