public TBaseResult <OperationsQueryItem> GetPageDataOperations(OperationsQueryItem queryItem) { this.SafetySecretKey = queryItem.SafetySecretKey; this.Usable = queryItem.IsUsable ? BasePluginType.Type.启用 : BasePluginType.Type.卸载; var result = new TBaseResult <OperationsQueryItem>() { Code = (int)EnumCore.CodeType.失败, Message = "系统错误", TData = new OperationsQueryItem() }; if (string.IsNullOrWhiteSpace(this.SafetySecretKey) || this.Usable == BasePluginType.Type.卸载 || PluginCore.GetInstance.VerifySafetySecretKey(this.SafetySecretKey)) { return(result); } var dt = MenuManager.GetInstance.GetPageDataOperations(queryItem); result.Code = (int)EnumCore.CodeType.成功; if (dt.PageData.Count <= 0) { result.Message = "暂无数据"; result.TData = dt; return(result); } result.Message = "获取成功"; result.TData = dt; return(result); }
public JsonResult GetPageDataOperations(OperationsQueryItem queryEntity) { queryEntity.SafetySecretKey = PluginCore.GetInstance.SafetySecretValue; queryEntity.IsUsable = true; var result = IocPlugin.IocGetPageDataOperationsPlugin.GetPageDataOperations(queryEntity); var pageResult = result.TData; var pageList = pageResult.PageData.Select(m => { return(new { displayID = m.ID, displayOperationTitle = m.OperationTitle, displayCTime = m.CTimeStr, displayOperation = GetDisplayOperationOperations(m.OpenId) }); }); return(Json(new { code = 0, msg = string.Empty, count = pageResult.Totals, data = pageList }, JsonRequestBehavior.AllowGet)); }
public OperationsQueryItem GetPageDataOperations(OperationsQueryItem queryItem) { if (!string.IsNullOrWhiteSpace(queryItem.OperationTitle)) { queryItem.Sql += string.Format(" and t.OperationTitle like '{0}'", queryItem.OperationTitle); } if (queryItem.StartCTime != null && queryItem.StartCTime.Year > 2000 && queryItem.EndCTime != null && queryItem.EndCTime.Year > 2000) { queryItem.Sql += string.Format(" and t.CTime>='{0}' and t.CTime<='{1}'", queryItem.StartCTime, queryItem.EndCTime); } if (queryItem.StartCTime != null && queryItem.StartCTime.Year > 2000 && (queryItem.EndCTime == null || queryItem.EndCTime.Year <= 2000)) { queryItem.Sql += string.Format(" and t.CTime>='{0}'", queryItem.StartCTime); } if ((queryItem.StartCTime == null || queryItem.StartCTime.Year <= 2000) && (queryItem.EndCTime != null && queryItem.EndCTime.Year >= 2000)) { queryItem.Sql += string.Format(" and t.CTime<='{0}'", queryItem.EndCTime); } queryItem.PageData = PageCore <OperationsQueryItem> .GetInstance.GetPageData(queryItem.Sql, queryItem.Page, queryItem.Limit, ref queryItem.Totals); return(queryItem); }