| | |
| | | { |
| | | Config = v.Config, |
| | | DicNo = v.DicNo, |
| | | Data = BaseDal.QueryDynamicDataBySql(v.DBSql) |
| | | Data = BaseDal.QueryDynamicDataBySql(v.DBSql), |
| | | SaveCache = false, |
| | | }); |
| | | } |
| | | } |
| | | |
| | | foreach (var item in selectDics) |
| | | { |
| | | if (!_cacheService.Exists(item.DicNo)) |
| | | if (!_cacheService.Exists(item.DicNo) && item.SaveCache) |
| | | { |
| | | _cacheService.Add(item.DicNo, item.Serialize()); |
| | | } |
| | |
| | | vueDictionaryDTOs.AddRange(selectDics); |
| | | } |
| | | |
| | | //object GetSourceData(string dicNo, string dbSql, object data) |
| | | //{ |
| | | // if (string.IsNullOrEmpty(dbSql)) |
| | | // { |
| | | // return data; |
| | | // } |
| | | // return BaseDal.QueryObjectDataBySql(dbSql, null); |
| | | //} |
| | | //List<VueDictionaryDTO> vueDictionaryDTOs = dicConfig.Select(item => new VueDictionaryDTO |
| | | //{ |
| | | // DicNo = item.dicNo, |
| | | // Config = item.config, |
| | | // Data = GetSourceData(item.dicNo, item.dbSql, item.list) |
| | | //}).ToList(); |
| | | |
| | | |
| | | return vueDictionaryDTOs; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |