/// <summary>
        ///     新增提现记录(提现)
        /// </summary>
        /// <param name="userContext"></param>
        /// <param name="request"></param>
        /// <returns></returns>
        public ResponseModel AddWithdrawingJournal(UserContext userContext,
                                                   NewWithdrawingJournalRequest request)
        {
            //获取提现用户绑定的手机号码
            var result = _accountbookProxyService.GetWithdrawingAccountList(userContext);
            var withdrawingAccountList = result.Data;

            if (result.Code != Convert.ToInt32(ResponseErrorcode.C200) || withdrawingAccountList == null)
            {
                return(new ResponseModel
                {
                    Code = (int)ErrorCodeEnum.ErrorGettingWithdrawingAccount,
                    Data = null,
                    Message = result.Message
                });
            }

            var phone         = withdrawingAccountList.First().MobilePhone;
            var responseModel = _sharedService.CheckVerificationCode(userContext, 1, 1, request.CheckCode, phone);

            if (responseModel.Code == (int)ErrorCodeEnum.Success)
            {
                var addResult = _accountbookProxyService.AddWithdrawingJournal(userContext, request);
                if (addResult != null)
                {
                    return(new ResponseModel
                    {
                        Code = addResult.Code,
                        Data = addResult.Data,
                        Message = addResult.Message
                    });
                }
            }
            else
            {
                responseModel.Code    = 1;
                responseModel.Data    = null;
                responseModel.Message = "验证码校验不正确,请重新输入!";
            }
            return(responseModel);
        }
Exemple #2
0
 public ResponseModel CheckVerificationCode(VerficationCodeRequestParams parameters)
 {
     return(_shardService.CheckVerificationCode(GetUserContext(), parameters.Context,
                                                (int)CaptchaPhoneEmailEnum.Phone, parameters.Code, parameters.Phone));
 }