Пример #1
0
        protected override GetVipWithDrawRuleRD ProcessRequest(APIRequest <EmptyRequestParameter> pRequest)
        {
            var loggingSessionInfo = new SessionManager().CurrentUserLoginInfo;

            if (loggingSessionInfo == null)
            {
                throw new APIException("用户未登录")
                      {
                          ErrorCode = ERROR_CODES.INVALID_REQUEST
                      }
            }
            ;
            VipWithDrawRuleBLL bll = new VipWithDrawRuleBLL(loggingSessionInfo);
            var dbEntity           = bll.GetVipWithDrawRule();

            return(TransModel(dbEntity));
        }
Пример #2
0
        protected override EmptyResponseData ProcessRequest(APIRequest <SetVipWithDrawRuleRP> pRequest)
        {
            var loggingSessionInfo = new SessionManager().CurrentUserLoginInfo;

            if (loggingSessionInfo == null)
            {
                throw new APIException("用户未登录")
                      {
                          ErrorCode = ERROR_CODES.INVALID_REQUEST
                      }
            }
            ;
            VipWithDrawRuleBLL bll = new VipWithDrawRuleBLL(loggingSessionInfo);

            if (!bll.SetVipWithDrawRule(pRequest.Parameters))
            {
                throw new APIException(ERROR_CODES.INVALID_BUSINESS, "发生错误");
            }
            return(new EmptyResponseData());
        }
    }