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("计划选择错误,该彩种在系统中包含这类型的计划"); }
public PlanInfoAppService(IPlanInfoQueryService planInfoQueryService, INormConfigQueryService normConfigQueryService, INormGroupQueryService normGroupQueryService) { _planInfoQueryService = planInfoQueryService; _normConfigQueryService = normConfigQueryService; _normGroupQueryService = normGroupQueryService; }
public PlanTrackAppService(ILotteryPredictDataQueryService lotteryPredictDataQueryService, IPlanInfoQueryService planInfoQueryService, ILotteryDataAppService lotteryDataAppService) { _lotteryPredictDataQueryService = lotteryPredictDataQueryService; _planInfoQueryService = planInfoQueryService; _lotteryDataAppService = lotteryDataAppService; }
public NormConfigAppService(INormConfigQueryService normConfigQueryService, IUserNormDefaultConfigService normDefaultConfigService, IPositionInfoQueryService positionInfoQueryService, IPlanInfoQueryService planInfoQueryService) { _normConfigQueryService = normConfigQueryService; _normDefaultConfigService = normDefaultConfigService; _positionInfoQueryService = positionInfoQueryService; _planInfoQueryService = planInfoQueryService; }
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; }
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; }
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; }
public LotteryPredictTableService(ILotteryQueryService lotteryQueryService, IPlanInfoQueryService planInfoQueryService, ICommandService commandService) { _lotteryQueryService = lotteryQueryService; _planInfoQueryService = planInfoQueryService; _commandService = commandService; }
protected BaseJudgePerdictDataResult() { _planInfoQueryService = ObjectContainer.Resolve <IPlanInfoQueryService>(); _lotteryDataQueryService = ObjectContainer.Resolve <ILotteryDataQueryService>(); }