/// <summary>
        /// 是否重新下载项目信息
        /// </summary>
        /// <param name="updatejson">是否重新下载配置分类</param>
        public void LoadConfig(bool isload)
        {
            lock (_lockconfig)
            {
                string jasonpath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "json", "json.txt");
                try
                {
                    bool     isupdatelocal = false;
                    DateTime updatetime    = DateTime.Now;

                    if (isload)
                    {
                        SystemConfigDal scdal = new SystemConfigDal();
                        SystemConfig    sc    = scdal.GetRedisServer(AppDomainContext.Context.ConfigParams.ConfigManagerConnectString);
                        if (sc != null)
                        {
                            AppDomainContext.Context.ConfigParams.RedisServer = sc.ConfigValue;
                        }

                        //更新项目信息
                        ProjectDal prodal = new ProjectDal();
                        AppDomainContext.Context.ProjectModel = prodal.GetByName(AppDomainContext.Context.ConfigParams.ConfigManagerConnectString, AppDomainContext.Context.ConfigParams.ProjectName);

                        //更新分类信息
                        CategoryDal catedal = new CategoryDal();
                        AppDomainContext.Context.CategoryModels = catedal.GetListByIds(AppDomainContext.Context.ConfigParams.ConfigManagerConnectString, AppDomainContext.Context.ProjectModel.CategoryIds);
                        long[] cids = AppDomainContext.Context.CategoryModels.Select(p => p.Id).ToArray();
                        //更新配置信息
                        ConfigDal          configdal    = new ConfigDal();
                        List <Config>      configs      = configdal.GetListByCategoryIds(AppDomainContext.Context.ConfigParams.ConfigManagerConnectString, cids, updatetime);
                        List <ConfigModel> configmodels = ToConfigModel(configs);

                        ConfigInfoOfKeyDic dic = new ConfigInfoOfKeyDic();
                        foreach (var item in configmodels)
                        {
                            dic.SetConfig(item);
                        }
                        AppDomainContext.Context.ConfigInfoOfKeyDic = dic;

                        if (configs.Count > 0)
                        {
                            configdal.SetUpdatetime(AppDomainContext.Context.ConfigParams.ConfigManagerConnectString, cids, updatetime);
                            isupdatelocal = true;
                        }
                    }
                    else
                    {
                        ConfigDal configdal = new ConfigDal();
                        long[]    cids      = AppDomainContext.Context.CategoryModels.Select(p => p.Id).ToArray();

                        List <Config>      configs      = configdal.GetListByCategoryIds(AppDomainContext.Context.ConfigParams.ConfigManagerConnectString, cids, updatetime);
                        List <ConfigModel> configmodels = ToConfigModel(configs);
                        foreach (var item in configmodels)
                        {
                            AppDomainContext.Context.ConfigInfoOfKeyDic.SetConfig(item);
                        }
                        if (configs.Count > 0)  //本次有配置更新
                        {
                            configdal.SetUpdatetime(AppDomainContext.Context.ConfigParams.ConfigManagerConnectString, cids, updatetime);
                            isupdatelocal = true;
                        }
                    }

                    if (isupdatelocal)
                    {
                        string json1 = JsonConvert.SerializeObject(AppDomainContext.Context);
                        IOHelper.Write(jasonpath, json1);  //写入磁盘
                        LogHelper.WriteInfo("写入磁盘成功");
                    }
                }
                catch (Exception)
                {
                    string json2 = IOHelper.Read(jasonpath);
                    JsonConvert.DeserializeObject <ConfigContext>(json2);   //从磁盘获得上次正确的配置
                    LogHelper.WriteInfo("从磁盘读取配置");
                }
            }
        }