public HttpResponseMessage GetLanguageTypeList(string LoginAccount) { var returnObj = new Business.WebApi.Models.ResultObject <List <string> >(); List <string> retList = new List <string>(); //取用户登录成功后保存的session string emailAccount = LoginAccount; Business.Core.Manager manager = null; manager = ManageService.GetManagerByUsername(emailAccount); if (manager.ParentId != 0) { manager = ManageService.GetManagerById(manager.ParentId); } if (manager != null) { List <Business.Core.ManagerMainSite> mangerMainSiteList = ManagerMainSiteService.GetManagerMainSitesByManagerId(manager.Id); foreach (var tmp in mangerMainSiteList) { retList.Add(tmp.LanguageName); } } returnObj.ReturnData = retList; returnObj.Status = Business.WebApi.Models.ServerStatus.SearchSuccess; return(Request.CreateResponse <Business.WebApi.Models.ResultObject <List <string> > >(HttpStatusCode.OK, returnObj)); }
public HttpResponseMessage GetInfoListByIp(Business.Core.VisitRecord.AnalysisSiteQuery query) { /*****根据客户的邮箱账号,网站语言,和输入查询的ip来查询出访问信息*****/ //取用户登录成功后保存的session string emailAccount = query.LoginAccount; //获取传过来的的网站语言 string language = query.Language; Business.Core.VisitRecord.WebSiteAnalysisQuery anaysisQuery = new Core.VisitRecord.WebSiteAnalysisQuery(); anaysisQuery.IsPager = query.IsPager; anaysisQuery.Language = query.Language; anaysisQuery.OrderByDesc = query.OrderByDesc; anaysisQuery.OrderByValue = query.OrderByValue; anaysisQuery.PageIndex = query.PageIndex; anaysisQuery.PageSize = query.PageSize; anaysisQuery.VIp = query.VIp; Business.Core.Manager manager = null; manager = ManageService.GetManagerByUsername(emailAccount); if (manager.ParentId != 0) { manager = ManageService.GetManagerById(manager.ParentId); } var returnObj = new Business.WebApi.Models.ResultObject <List <Business.Core.VisitRecord.WebSiteAnalysisInfo> >(); int recordcount = 0; returnObj.ReturnData = VisitRecordService.GetVisitRecordList(anaysisQuery, manager.UserName, out recordcount); returnObj.RecordCount = recordcount; returnObj.Status = Business.WebApi.Models.ServerStatus.Success; return(Request.CreateResponse <Business.WebApi.Models.ResultObject <List <Business.Core.VisitRecord.WebSiteAnalysisInfo> > >(HttpStatusCode.OK, returnObj)); }
public HttpResponseMessage GetCompanyInfo(string LoginAccount, string Language) { var returnObj = new Business.WebApi.Models.ResultObject <Business.WebApi.Models.CompanyAndSummaryInfo>(); Business.WebApi.Models.CompanyAndSummaryInfo model = new Models.CompanyAndSummaryInfo(); //取用户登录成功后保存的session Business.Core.Manager manager = null; manager = ManageService.GetManagerByUsername(LoginAccount); if (manager.ParentId != 0) { manager = ManageService.GetManagerById(manager.ParentId); } if (manager != null) { model.CompanyName = manager.Company;//公司名 model.PeopleNum = VisitRecordService.GetIpCount(Language, manager.UserName); model.ProductCount = VisitRecordService.GetVisitRecordCount(Language, manager.UserName); } returnObj.ReturnData = model; returnObj.Status = Business.WebApi.Models.ServerStatus.SearchSuccess; return(Request.CreateResponse <Business.WebApi.Models.ResultObject <Business.WebApi.Models.CompanyAndSummaryInfo> >(HttpStatusCode.OK, returnObj)); }