@Override public boolean login(String staffid, String password) { Staff staff = staffDao.findByStaffId(staffid); if (staff == null) { return false; } if (password.equals(staff.getPassword())) return true; else return false; }
private StaffInfo convertEntity(Staff entity) { StaffInfo temp = new StaffInfo(); temp.setId(entity.getId()); temp.setStaffid(entity.getStaffid()); temp.setPosition(entity.getPosition()); temp.setStaffname(entity.getStaffname()); temp.setPassword(entity.getPassword()); temp.setRemarks(entity.getRemarks()); return temp; }