@Test public void loginSuccess() { User user = userService.findUserByUserName("admin"); user.setUserId(1); user.setUserName("admin"); user.setLastIp("192.168.12.7"); user.setLastVisit(new Date()); userService.loginSuccess(user); }
public void loginSuccess(User user) { LoginLog loginLog = new LoginLog(); loginLog.setUserId(user.getUserId()); loginLog.setIp(user.getLastIp()); loginLog.setLoginDate(user.getLastVisit()); loginLogDao.insertLoginLog(loginLog); }
UserService { public void loginSuccess(User user) { LoginLog loginLog = new LoginLog(); loginLog.setUserId(user.getUserId()); loginLog.setIp(user.getLastIp()); loginLog.setLoginDate(user.getLastVisit()); loginLogDao.insertLoginLog(loginLog); } }
UserService { public void loginSuccess(User user) { LoginLog loginLog = new LoginLog(); loginLog.setUserId(user.getUserId()); loginLog.setIp(user.getLastIp()); loginLog.setLoginDate(user.getLastVisit()); loginLogDao.insertLoginLog(loginLog); }  }
UserService { public void loginSuccess(User user) { LoginLog loginLog = new LoginLog(); loginLog.setUserId(user.getUserId()); loginLog.setIp(user.getLastIp()); loginLog.setLoginDate(user.getLastVisit()); loginLogDao.insertLoginLog(loginLog); }  boolean hasMatchUser(String userName, String password); User findUserByUserName(String userName); void loginSuccess(User user); }
UserService { public void loginSuccess(User user) { LoginLog loginLog = new LoginLog(); loginLog.setUserId(user.getUserId()); loginLog.setIp(user.getLastIp()); loginLog.setLoginDate(user.getLastVisit()); loginLogDao.insertLoginLog(loginLog); }  boolean hasMatchUser(String userName, String password); User findUserByUserName(String userName); void loginSuccess(User user);  }