HttpServletRequest req, HttpServletResponse resp, Model model) {
// TODO 验证用户存在并添加cookie和重定向到指定页面
HttpSession session = req.getSession();
if (!"".equals(username)) {
Account account = accountService.findAccount(username);
if (null != account && password.equals(account.getPassword())) {
OnlineAccount onlineAccount = new OnlineAccount();
onlineAccount.setAccount(account.getAccounts());
onlineAccount.setAccountId(account.getId());
onlineAccount.setSessionId(session.getId());
onlineAccount.setAccountStatus(true);
onlineAccountService.addOnlineAccount(onlineAccount);