/// <summary> /// Redis 缓存历史开奖数据 /// </summary> static LotteryDataManager() { _lotteryDataAppService = ServiceLocator.Current.GetInstance <ILotteryDataAppService>(); _historyLotteryDataDictionary = _lotteryDataAppService.GetAnaylesBasicLotteryDatas(LsConstant.LOAD_HISTORY_LOTTERYDATA); foreach (var item in _historyLotteryDataDictionary) { var lotteryDataRedisKey = string.Format(LsConstant.LotteryDataCacheKey, item.Key); if (RedisHelper.KeyExists(lotteryDataRedisKey)) { RedisHelper.KeyDelete(lotteryDataRedisKey); } //foreach (var data in item.Value) //{ // RedisHelper.SetHash(lotteryDataRedisKey, data.Id, data); //} //Parallel.ForEach(item.Value, new ParallelOptions() //{ // MaxDegreeOfParallelism = LsConstant.MaxDegreeOfParallelism, //}, lotteryData => //{ // RedisHelper.SetHash(lotteryDataRedisKey, lotteryData.Id, lotteryData); //}); //RedisHelper.AddList(lotteryDataRedisKey, item.Value); //item.Value.AsParallel().ForAll(val => //{ // RedisHelper.AddList(lotteryDataRedisKey, val); //}); CacheHelper.SetCache(lotteryDataRedisKey, item.Value); } }
public LotteryController(ILotteryDataAppService lotteryDataAppService, ILotteryPlanManager lotteryPlanManager, ILotteryAnalyseNormAppService analyseNormAppService) { _lotteryDataAppService = lotteryDataAppService; _lotteryPlanManager = lotteryPlanManager; _analyseNormAppService = analyseNormAppService; }
public PlanTrackAppService(ILotteryPredictDataQueryService lotteryPredictDataQueryService, IPlanInfoQueryService planInfoQueryService, ILotteryDataAppService lotteryDataAppService) { _lotteryPredictDataQueryService = lotteryPredictDataQueryService; _planInfoQueryService = planInfoQueryService; _lotteryDataAppService = lotteryDataAppService; }
public DataUpdateContainer( LotteryUpdateConfig lotteryUpdateConfig, ILotteryDataAppService lotteryDataAppService, LotteryDataJob lotteryDataJob) { _lotteryUpdateConfig = lotteryUpdateConfig; _lotteryDataAppService = lotteryDataAppService; _lotteryDataJob = lotteryDataJob; }
protected LotteryDataJob(LotteryType lotteryType) { HostingEnvironment.RegisterObject(this); _LotteryType = lotteryType; _lotteryDataAppService = ServiceLocator.Current.GetInstance <ILotteryDataAppService>(); _lotteryUpdateConfigLoader = ServiceLocator.Current.GetInstance <ILotteryUpdateConfigLoader>(); _lotteryUpdateConfig = _lotteryUpdateConfigLoader.GetLotteryUpdateConfigs().Single(p => p.Name == lotteryType.ToString()); //_nextLotteryTime = _lotteryUpdateConfig.NextLotteryTime; _dataUpdateContainer = new DataUpdateContainer(_lotteryUpdateConfig, _lotteryDataAppService, this); }
public LotteryController(ILotteryDataAppService lotteryDataAppService, ICommandService commandService, INormConfigQueryService normConfigQueryService, ILotteryPredictDataQueryService lotteryPredictDataQueryService, IPlanTrackAppService planTrackAppService, ILotteryQueryService lotteryQueryService, ICacheManager cacheManager) : base(commandService) { _lotteryDataAppService = lotteryDataAppService; _normConfigQueryService = normConfigQueryService; _lotteryPredictDataQueryService = lotteryPredictDataQueryService; _planTrackAppService = planTrackAppService; _lotteryQueryService = lotteryQueryService; _cacheManager = cacheManager; }
public SellController(ICommandService commandService, ISellAppService sellAppService, IUserManager userManager, INormConfigAppService normConfigAppService, IPlanInfoAppService planInfoAppService, INormPlanConfigQueryService normPlanConfigQueryService, IUserNormDefaultConfigService userNormDefaultConfigService, ILotteryDataAppService lotteryDataAppService, IUserInfoService userInfoService) : base(commandService) { _sellAppService = sellAppService; _userManager = userManager; _normConfigAppService = normConfigAppService; _planInfoAppService = planInfoAppService; _normPlanConfigQueryService = normPlanConfigQueryService; _userNormDefaultConfigService = userNormDefaultConfigService; _lotteryDataAppService = lotteryDataAppService; _userInfoService = userInfoService; }
public PlanController(ICommandService commandService, IPlanInfoAppService planInfoAppService, IUserNormDefaultConfigService userNormDefaultConfigService, UserPlanInfoInputValidator planInfoInputValidator, ILotteryDataAppService lotteryDataAppService, INormConfigAppService normConfigAppService, UserNormConfigInputValidator userNormConfigInputValidator, INormPlanConfigQueryService normPlanConfigQueryService, ICacheManager cacheManager, IAuthRankQueryService authRankQueryService) : base(commandService) { _planInfoAppService = planInfoAppService; _userNormDefaultConfigService = userNormDefaultConfigService; _planInfoInputValidator = planInfoInputValidator; _lotteryDataAppService = lotteryDataAppService; _normConfigAppService = normConfigAppService; _userNormConfigInputValidator = userNormConfigInputValidator; _normPlanConfigQueryService = normPlanConfigQueryService; _cacheManager = cacheManager; _authRankQueryService = authRankQueryService; }