public BasicResponse <GascontentanalyzeconfigInfo> AddGascontentanalyzeconfig(
            GascontentanalyzeconfigAddRequest gascontentanalyzeconfigRequest)
        {
            gascontentanalyzeconfigRequest.GascontentanalyzeconfigInfo.Id = IdHelper.CreateLongId().ToString();
            var _gascontentanalyzeconfig =
                ObjectConverter.Copy <GascontentanalyzeconfigInfo, GascontentanalyzeconfigModel>(
                    gascontentanalyzeconfigRequest.GascontentanalyzeconfigInfo);
            var resultgascontentanalyzeconfig   = _Repository.AddGascontentanalyzeconfig(_gascontentanalyzeconfig);
            var gascontentanalyzeconfigresponse = new BasicResponse <GascontentanalyzeconfigInfo>();

            gascontentanalyzeconfigresponse.Data =
                ObjectConverter.Copy <GascontentanalyzeconfigModel, GascontentanalyzeconfigInfo>(
                    resultgascontentanalyzeconfig);

            //更新缓存
            var req = new GasContentAnalyzeConfigAddCacheRequest
            {
                Info = gascontentanalyzeconfigRequest.GascontentanalyzeconfigInfo
            };

            _gasContentAnalyzeConfigCacheService.AddCache(req);

            return(gascontentanalyzeconfigresponse);
        }
Exemple #2
0
 public BasicResponse AddCache(GasContentAnalyzeConfigAddCacheRequest request)
 {
     GasContentAnalyzeConfigCache.CacheInstance.AddItem(request.Info);
     return(new BasicResponse());
 }