Exemple #1
0
        public UserPlanInfoInputValidator()
        {
            _planInfoQueryService = ObjectContainer.Resolve <IPlanInfoQueryService>();
            RuleFor(p => p.PlanIds).Must(p =>
            {
                if (p == null || p.Count <= 0)
                {
                    return(false);
                }

                return(true);
            }).WithMessage("至少选择一个计划");

            RuleFor(p => p.PlanIds).Must(p =>
            {
                if (p.Count != p.Distinct().Count())
                {
                    return(false);
                }
                return(true);
            }).WithMessage("不允许选择重复的计划");

            RuleFor(p => p.PlanIds).Must(p =>
            {
                var lotterySession = NullLotterySession.Instance;
                var planInfos      = _planInfoQueryService.GetPlanInfoByLotteryId(lotterySession.SystemTypeId);
                var allPlanIds     = planInfos.Select(q => q.Id).ToList();

                if (p.All(t => allPlanIds.Any(b => b == t.PlanId)))
                {
                    return(true);
                }
                return(false);
            }).WithMessage("计划选择错误,该彩种在系统中包含这类型的计划");
        }
Exemple #2
0
 public PlanInfoAppService(IPlanInfoQueryService planInfoQueryService,
                           INormConfigQueryService normConfigQueryService,
                           INormGroupQueryService normGroupQueryService)
 {
     _planInfoQueryService   = planInfoQueryService;
     _normConfigQueryService = normConfigQueryService;
     _normGroupQueryService  = normGroupQueryService;
 }
Exemple #3
0
 public PlanTrackAppService(ILotteryPredictDataQueryService lotteryPredictDataQueryService,
                            IPlanInfoQueryService planInfoQueryService,
                            ILotteryDataAppService lotteryDataAppService)
 {
     _lotteryPredictDataQueryService = lotteryPredictDataQueryService;
     _planInfoQueryService           = planInfoQueryService;
     _lotteryDataAppService          = lotteryDataAppService;
 }
Exemple #4
0
 public NormConfigAppService(INormConfigQueryService normConfigQueryService,
                             IUserNormDefaultConfigService normDefaultConfigService,
                             IPositionInfoQueryService positionInfoQueryService,
                             IPlanInfoQueryService planInfoQueryService)
 {
     _normConfigQueryService   = normConfigQueryService;
     _normDefaultConfigService = normDefaultConfigService;
     _positionInfoQueryService = positionInfoQueryService;
     _planInfoQueryService     = planInfoQueryService;
 }
Exemple #5
0
 public LotteryPredictDataService(ILotteryFinalDataQueryService lotteryFinalDataQueryService,
                                  ILotteryQueryService lotteryQueryService,
                                  ILotteryPredictDataQueryService lotteryPredictDataQueryService,
                                  IPlanInfoQueryService planInfoQueryService,
                                  ILotteryDataQueryService lotteryDataQueryService)
 {
     _lotteryFinalDataQueryService   = lotteryFinalDataQueryService;
     _lotteryQueryService            = lotteryQueryService;
     _lotteryPredictDataQueryService = lotteryPredictDataQueryService;
     _planInfoQueryService           = planInfoQueryService;
     _lotteryDataQueryService        = lotteryDataQueryService;
     _logger = NullLotteryLogger.Instance;
 }
Exemple #6
0
 public LotteryDataAppService(
     ILotteryDataQueryService lotteryDataQueryService,
     INormConfigQueryService normConfigQueryService,
     ILotteryPredictDataService lotteryPredictDataService,
     ILotteryFinalDataQueryService lotteryFinalDataQueryService,
     ILotteryQueryService lotteryQueryService,
     IPlanInfoQueryService planInfoQueryService,
     IPredictService predictService)
 {
     _lotteryDataQueryService      = lotteryDataQueryService;
     _normConfigQueryService       = normConfigQueryService;
     _lotteryPredictDataService    = lotteryPredictDataService;
     _lotteryFinalDataQueryService = lotteryFinalDataQueryService;
     _lotteryQueryService          = lotteryQueryService;
     _planInfoQueryService         = planInfoQueryService;
     _predictService = predictService;
 }
Exemple #7
0
 public NormController(ICommandService commandService,
                       INormConfigAppService normConfigAppService,
                       UserNormConfigInputValidator userNormDefaultConfigInputValidator,
                       IUserNormDefaultConfigService userNormDefaultConfigService,
                       INormPlanConfigQueryService normPlanConfigQueryService,
                       ILotteryQueryService lotteryQueryService,
                       IPlanInfoQueryService planInfoQueryService,
                       ICacheManager cacheManager)
     : base(commandService)
 {
     _normConfigAppService = normConfigAppService;
     _userNormDefaultConfigInputValidator = userNormDefaultConfigInputValidator;
     _userNormDefaultConfigService        = userNormDefaultConfigService;
     _normPlanConfigQueryService          = normPlanConfigQueryService;
     _lotteryQueryService  = lotteryQueryService;
     _planInfoQueryService = planInfoQueryService;
     _cacheManager         = cacheManager;
 }
Exemple #8
0
 public LotteryPredictTableService(ILotteryQueryService lotteryQueryService, IPlanInfoQueryService planInfoQueryService, ICommandService commandService)
 {
     _lotteryQueryService  = lotteryQueryService;
     _planInfoQueryService = planInfoQueryService;
     _commandService       = commandService;
 }
Exemple #9
0
 protected BaseJudgePerdictDataResult()
 {
     _planInfoQueryService    = ObjectContainer.Resolve <IPlanInfoQueryService>();
     _lotteryDataQueryService = ObjectContainer.Resolve <ILotteryDataQueryService>();
 }