Пример #1
0
 /* (non-Javadoc)
  * @see com.service.impl.AdminService#login(com.model.Admin)
  */
 public boolean login(Admin admin) {
   if (adminDao.isIn(admin.getUsername())) {
     Admin tureAdmin = adminDao.getAdminByUsername(admin.getUsername());
     if (admin.getPassword().equals(tureAdmin.getPassword())) {
       return true;
     } else {
       return false;
     }
   } else {
     return false;
   }
 }
Пример #2
0
 // 获取登录用户
 public Admin getAdmin(Admin admin) {
   return adminDao.getAdminByUsername(admin.getUsername());
 }