/// <summary> /// 根据登录用户,检查数据,并返回用户对象 /// </summary> /// <param name="user">登录用户对象</param> /// <returns>存在的用户对象</returns> public static AccountUser GetUser(LoginUser user) { try { if (user == null) { throw new Exception("LoginUser is null"); } AccountUser accountUser = factory.GetUser(user); if (accountUser == null) { throw new Exception("DAL.SOAccount.AccountFactory.GetUser()==null"); } if (!string.IsNullOrEmpty(user.langCode)) { accountUser.langCode = user.langCode; } return(accountUser); } catch (Exception ex) { LogHelper.WriteLog(new Log() { message = ex.Message }, "GetUser"); return(null); } }