Example #1
0
        public static FundInfo GetFundInfo(string fundCode)
        {
            var info = DataDao.GetFundInfo(fundCode);

            if (DataHelper.IsDataReady(info))
            {
                return(info);
            }
            else
            {
                var noData = info == null;
                info = EmService.GetFundInfo(fundCode);
                if (noData)
                {
                    DataDao.InsertFundInfo(info);
                }
                else
                {
                    DataDao.UpdateFundInfo(info);
                }
                return(info);
            }
        }