Example #1
0
 /// <summary>
 /// 更新App配置
 /// </summary>
 /// <param name="info"></param>
 /// <returns></returns>
 public CommonActionResult UpdateAppConfig(APPConfigInfo info)
 {
     try
     {
         new CacheDataBusiness().UpdateAppConfig(info);
         return(new CommonActionResult(true, "更新成功"));
     }
     catch (Exception ex)
     {
         throw new Exception("更新APP配置出错", ex);
     }
 }
Example #2
0
        public APPConfigInfo QueryAppConfigByAgentId(string appAgentId)
        {
            if (string.IsNullOrEmpty(appAgentId))
            {
                appAgentId = "100000";
            }

            _AppConfigList = new DataQuery().QueryAppConfigList();
            var config = _AppConfigList.FirstOrDefault(p => p.AppAgentId == appAgentId);

            if (config == null)
            {
                var entity = new DataQuery().QueryAppConfigByAgentId(appAgentId);
                if (entity == null)
                {
                    throw new LogicException("未查询到下载地址");
                }
                config = new APPConfigInfo();
                ObjectConvert.ConverEntityToInfo(entity, ref config);
                _AppConfigList.Add(config);
            }
            return(config);
        }