/// <summary> /// 描述:初始化用户信息 /// </summary> /// <param name="userId"></param> /// <returns></returns> public ActionResult InitAdUser(string userId) { long userIdlong = long.Parse(EncryptHelper.DesDecrypt(userId)); var userInfo = HomeBusiness.GetUserAndAccountById(userIdlong); var userView = new UserView(); if (userInfo != null) { userView.UserId = EncryptHelper.DesEncrypt(userInfo.Id.ToString()); userView.BUName = userInfo.BUName; userView.BUJobNumber = userInfo.BUJobNumber; userView.BUSex = userInfo.BUSex ?? 0; userView.BUAvatars = userInfo.BUAvatars; userView.AvatarsUrl = userInfo.AvatarsUrl; userView.BUPhoneNum = userInfo.BUPhoneNum; userView.BUEmail = userInfo.BUEmail; userView.DepartId = EncryptHelper.DesEncrypt(userInfo.BUDepartId.ToString()); userView.BUTitle = userInfo.BUTitle; userView.BUIsValid = userInfo.BUIsValid; userView.BUDepartName = userInfo.BUDepartName; userView.BUEnglishName = userInfo.BUEnglishName; userView.BUPosition = userInfo.BUPosition; userView.BUExtensionPhone = userInfo.BUExtensionPhone; userView.BUMobilePhone = userInfo.BUMobilePhone; userView.Account = userInfo.Account; userView.IsExistAccount = string.IsNullOrEmpty(userView.Account) ? false : true; } return(Json(userView, JsonRequestBehavior.AllowGet)); }