public async Task <AdminUser> Login(string userName, string password) { var user = await _userStore.GetAdminUserAsync(userName, password); if (user == null) { return(null); } else { if (user.Status == 0) { return(null); } var token = GetToken(user.Id); var userMenus = await _userSelfService.GetUerMenusAsync(user.Id); redis.AddUserLoginInfo(token, user, userMenus); return(user); } }