public HttpResponseMessage GetUserInfo([FromUri] UserInfoGetRequest eugRequest) { var result = _userInfoService.GetUserInfo(eugRequest); var list = new PageList <UserCenterInfoResponse>() { PageIndex = eugRequest.pageIndex == null ? ConstKeys.DEFAULT_PAGEINDEX : eugRequest.pageIndex.Value, PageSize = result.PageSize, TotalCount = result.TotalCount, TotalPages = result.TotalPages, Data = result.ToList() }; return(toListJson(list, OperatingState.Success, "获取成功")); }
public async Task <UserInfoDto> DisplayUserInfo(string userName) { var userInfo = await _userInfo.GetUserInfo(userName); var userInfoDto = _mapper.Map <UserInfoDto>(userInfo); return(userInfoDto); }
public UserInfo GetUserInfoById(int UserInfoId) { OdbcConnection conn; IList <UserInfo> UserInfo; SearchCondition[] condition = new SearchCondition[] { new SearchCondition { con = "id=?", param = "@id", value = UserInfoId.ToString() } }; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); UserInfo = UserInfoDal.GetUserInfo(condition, conn); if (UserInfo.Count > 0) { return(UserInfo[0]); } conn.Close(); return(null); } }