public JsonResult GetAdverLogo(decimal latitude, decimal longitude, int pageIndex, int pageSize) { JsonStateResult r = new JsonStateResult(); int areaId = _service.GetAreaByPosition(latitude, longitude); int count = 0; var list = _service.GetUserByAreaId(out count, areaId: areaId, pageIndex: pageIndex, pageSize: pageSize); if (list != null && list.Count() > 0) { r.Data = list.Where(l => l.Level == 0); r.Data2 = list.Where(l => l.Level == 1); if (pageSize > 50) { r.Data4 = list.Where(t => string.IsNullOrEmpty(t.Company) == false).Select(t => t.Company); } else { r.Data4 = _service.GetUserByAreaId(out count, areaId: areaId, pageIndex: 1, pageSize: 999).Where(t => string.IsNullOrEmpty(t.Company) == false).Select(t => t.Company); } r.Msg = areaId.ToString(); r.Error = 0; } r.Data3 = _service.GetBanner().Select(t => t.Url); return(Json(r)); }
public string AjaxGetPropagandaUser(int aid, string keyword, int pageIndex, int pageSize) { SimpleJsonResult jr = new SimpleJsonResult(); int count = 0; var list = _propagandaUserService.GetUserByAreaId(out count, aid, keyword, pageIndex, pageSize); if (list != null && list.Count() > 0) { jr.status = 1; jr.data = list; jr.dataCount = count; } return(JsonConverter.SerializeObject(jr)); }