示例#1
0
        //中止债权转让
        public void StopTransfer()
        {
            Guid userId     = WebUserAuth.UserId.Value;
            Guid transferId = Guid.Empty;

            Guid.TryParse(Context.Request["transferid"], out transferId);
            string            code      = Context.Request["code"];
            UserBLL           bll       = new UserBLL();
            UserBasicInfoInfo userModel = bll.GetUserBasicInfoModelById(userId);

            if (userModel != null && !string.IsNullOrEmpty(userModel.TelNo))
            {
                int msgCode = new TuanDai.PortalSystem.BLL.CodeRecordBLL().CheckCodeRecord(code, userModel.TelNo, MsCodeType.PhoneCode, MsCodeType2.PCStopTransferCode, userId, true);
                /*1:验证通过;0:参数错误;-1:验证码不存在;-2:验证码已过期;-3:验证码已使用;-4:验证已过期*/
                string msg = string.Empty;
                switch (msgCode)
                {
                case 0:
                    msg = "参数错误";
                    break;

                case -1:
                    msg = "验证码不存在";
                    break;

                case -2:
                    msg = "验证码已过期";
                    break;

                case -3:
                    msg = "验证码已使用";
                    break;

                case -4:
                    msg = "验证已过期";
                    break;

                default:
                    break;
                }
                if (msgCode != 1)
                {
                    PrintJson(msgCode.ToString(), msg);
                    return;
                }
                int result = new TuanDai.PortalSystem.BLL.SubScriberansferBLL().StopTransfer(userId, transferId);
                if (result != 1)
                {
                    PrintJson(result.ToString(), "终止转让失败");
                    return;
                }
                PrintJson(result.ToString(), "终止转让成功");
            }
        }
示例#2
0
        public void SubmitZhphLoan()
        {
            PrintJson("-1", "触屏版不支持正合普惠借款,请前往PC或APP");
            return;

            Guid userId    = WebUserAuth.UserId.Value;
            int  ApplyType = WEBRequest.GetFormInt("ApplyType", 0);

            if (!ApplyType.ToString().IsIn("1", "2", "3", "4"))
            {
                PrintJson("0", "借款方案不支持");
                return;
            }
            var userbll = new UserBLL();
            var user    = userbll.GetUserBasicInfoModelById(userId);

            if (user == null)
            {
                this.PrintJson("-2", "用户不存在");
            }
            string code  = WEBRequest.GetFormString("code");
            string telno = WEBRequest.GetFormString("phone");

            if (telno.IsEmpty())
            {
                PrintJson("0", "手机号不能为空!");
                return;
            }
            if (code.IsEmpty())
            {
                PrintJson("0", "验证码不能为空!");
                return;
            }
            int msgCode = new TuanDai.PortalSystem.BLL.CodeRecordBLL().CheckCodeRecord(code, telno, MsCodeType.PhoneCode, MsCodeType2.ZhphFastLoanCode, userId, true);
            /*1:验证通过;0:参数错误;-1:验证码不存在;-2:验证码已过期;-3:验证码已使用;-4:验证已过期*/
            string msg = string.Empty;

            switch (msgCode)
            {
            case 0:
                msg = "参数错误";
                break;

            case -1:
                msg = "验证码不存在";
                break;

            case -2:
                msg = "验证码已过期";
                break;

            case -3:
                msg = "验证码已使用";
                break;

            case -4:
                msg = "验证已过期";
                break;

            default:
                break;
            }
            if (msgCode != 1)
            {
                PrintJson(msgCode.ToString(), msg);
                return;
            }


            ProjectBLL projectbll = new ProjectBLL();

            TuanDai.PortalSystem.Model.WXZhphApplyLoanInfo loanInfo = new TuanDai.PortalSystem.Model.WXZhphApplyLoanInfo();
            loanInfo.Id        = Guid.NewGuid();
            loanInfo.AppTypeId = ApplyType;
            loanInfo.UserId    = userId;
            loanInfo.AddDate   = DateTime.Now;
            loanInfo.AppName   = WEBRequest.GetFormString("name");
            loanInfo.Phone     = WEBRequest.GetFormString("phone");
            loanInfo.Provice   = WEBRequest.GetFormString("sel_city1");
            loanInfo.City      = WEBRequest.GetFormString("sel_city2");
            loanInfo.AreaCode  = WEBRequest.GetFormString("areacode");
            //1:pc  2: ios 3:android  4:触屏版 5:服务号
            loanInfo.DeviceType = 4;
            if (GlobalUtils.IsWeiXinBrowser)
            {
                loanInfo.DeviceType = 5;
            }

            bool isSave = projectbll.SubmitZhphLoan(loanInfo);

            if (!isSave)
            {
                PrintJson("0", "数据保存异常,请重试!");
                return;
            }
            PrintJson("1", "");
        }