Esempio n. 1
0
        public override void OnActionExecuting(HttpActionContext actionContext)
        {
            var userMemberRank = _memberAppService.GetUserMemRank(_lotterySession.UserId, _lotterySession.SystemTypeId);

            if (userMemberRank == MemberRank.Ordinary)
            {
                throw new LotteryException(_desc);
            }
        }
Esempio n. 2
0
        protected BaseApiController(ICommandService commandService)
        {
            _commandService      = commandService;
            _lotteryQueryService = ObjectContainer.Resolve <ILotteryQueryService>();
            _lotterySession      = NullLotterySession.Instance;
            _logger           = NullLotteryLogger.Instance;
            _memberAppService = ObjectContainer.Resolve <IMemberAppService>();

            if (_lotterySession.SystemType == SystemType.App)
            {
                InitLotteryInfo();
                _userMemberRank =
                    _memberAppService.GetUserMemRank(_lotterySession.UserId, _lotterySession.SystemTypeId);
            }
        }