Exemplo n.º 1
0
 public JsonResult EditProfile4(string payOrderPhoto, string remark)
 {
     Mall.DTO.Shop shopInfo = ShopApplication.GetShop(CurrentSellerManager.ShopId);
     shopInfo.Id         = CurrentSellerManager.ShopId;
     shopInfo.PayPhoto   = payOrderPhoto;
     shopInfo.PayRemark  = remark;
     shopInfo.Stage      = Entities.ShopInfo.ShopStage.Finish;
     shopInfo.ShopStatus = Entities.ShopInfo.ShopAuditStatus.WaitConfirm;
     ShopApplication.UpdateShop(shopInfo);
     return(Json(new { success = true }));
 }
Exemplo n.º 2
0
 public JsonResult EditProfile2(ShopProfileStep2 shopProfileStep2)
 {
     Mall.DTO.Shop shopInfo = ShopApplication.GetShop(CurrentSellerManager.ShopId);
     shopInfo.Id = CurrentSellerManager.ShopId;
     shopInfo.BankAccountName                 = shopProfileStep2.BankAccountName;
     shopInfo.BankAccountNumber               = shopProfileStep2.BankAccountNumber;
     shopInfo.BankCode                        = shopProfileStep2.BankCode;
     shopInfo.BankName                        = shopProfileStep2.BankName;
     shopInfo.BankPhoto                       = shopProfileStep2.BankPhoto;
     shopInfo.BankRegionId                    = shopProfileStep2.BankRegionId;
     shopInfo.TaxpayerId                      = shopProfileStep2.TaxpayerId;
     shopInfo.TaxRegistrationCertificate      = shopProfileStep2.TaxRegistrationCertificate;
     shopInfo.TaxRegistrationCertificatePhoto = shopProfileStep2.TaxRegistrationCertificatePhoto;
     shopInfo.Stage = Entities.ShopInfo.ShopStage.ShopInfo;
     ShopApplication.UpdateShop(shopInfo);
     return(Json(new { success = true }));
 }
Exemplo n.º 3
0
        public JsonResult EditProfiles1(ShopProfileSteps1 shopProfileStep1)
        {
            //公司信息
            Mall.DTO.Shop shopInfo = ShopApplication.GetShop(CurrentSellerManager.ShopId);
            shopInfo.Id                   = CurrentSellerManager.ShopId;
            shopInfo.CompanyName          = shopProfileStep1.CompanyName;
            shopInfo.CompanyAddress       = shopProfileStep1.Address;
            shopInfo.CompanyRegionId      = shopProfileStep1.CityRegionId;
            shopInfo.CompanyRegionAddress = shopProfileStep1.Address;
            shopInfo.Stage                = Entities.ShopInfo.ShopStage.CompanyInfo;
            shopInfo.BusinessLicenseCert  = Request.Form["BusinessLicenseCert"];
            shopInfo.ProductCert          = Request.Form["ProductCert"];
            shopInfo.OtherCert            = Request.Form["OtherCert"];
            shopInfo.IDCard               = shopProfileStep1.IDCard;
            shopInfo.IDCardUrl            = shopProfileStep1.IDCardUrl;
            shopInfo.IDCardUrl2           = shopProfileStep1.IDCardUrl2;

            ShopApplication.UpdateShop(shopInfo);

            long uid = ShopApplication.GetShopManagers(CurrentSellerManager.ShopId);
            //管理员信息
            var mTheme = ShopApplication.GetSettled();
            var model  = MemberApplication.GetMemberAccountSafety(uid);

            if (!mTheme.SelfVerificationType.Equals(Mall.CommonModel.VerificationType.VerifyEmail) && shopProfileStep1.MemberPhone.Equals(""))
            {
                return(Json(new { success = false, msg = "必须认证手机!" }));
            }
            if (!mTheme.SelfVerificationType.Equals(Mall.CommonModel.VerificationType.VerifyPhone) && shopProfileStep1.MemberEmail.Equals(""))
            {
                return(Json(new { success = false, msg = "必须认证邮箱!" }));
            }

            //修改真实姓名
            var member = MemberApplication.GetMembers(uid);

            member.RealName = shopProfileStep1.RealName;
            MemberApplication.UpdateMember(member);

            //手机认证
            if (shopProfileStep1.MemberPhone != null && !shopProfileStep1.MemberPhone.Equals(model.Phone))
            {
                string pluginId = "Mall.Plugin.Message.SMS";
                int    result   = MemberApplication.CheckMemberCode(pluginId, shopProfileStep1.PhoneCode, shopProfileStep1.MemberPhone, uid);
                string strMsg   = "";
                switch (result)
                {
                case 0: strMsg = "手机验证码错误!"; break;

                case -1: strMsg = "此手机号已绑定!"; break;
                }
                if (!strMsg.Equals(""))
                {
                    return(Json(new { success = false, msg = strMsg }));
                }
            }

            //邮箱认证
            if (shopProfileStep1.MemberEmail != null && !shopProfileStep1.MemberEmail.ToString().Equals(model.Email))
            {
                string pluginId = "Mall.Plugin.Message.Email";
                int    result   = MemberApplication.CheckMemberCode(pluginId, shopProfileStep1.EmailCode, shopProfileStep1.MemberEmail, uid);
                string strMsg   = "";
                switch (result)
                {
                case 0: strMsg = "邮箱验证码错误!"; break;

                case -1: strMsg = "此邮箱已绑定!"; break;
                }
                if (!strMsg.Equals(""))
                {
                    return(Json(new { success = false, msg = strMsg }));
                }
            }


            ShopApplication.SetShopStage(Entities.ShopInfo.ShopStage.FinancialInfo, CurrentSellerManager.ShopId);//设置成功,则才是进入财务信息
            return(Json(new { success = true, msg = "成功!" }));
        }
Exemplo n.º 4
0
        public JsonResult EditProfile1(ShopProfileStep1 shopProfileStep1)
        {
            if (ShopApplication.ExistCompanyName(shopProfileStep1.CompanyName, CurrentSellerManager.ShopId))
            {
                return(Json(new { success = false, msg = "该公司名已存在!" }));
            }
            if (ShopApplication.ExistBusinessLicenceNumber(shopProfileStep1.BusinessLicenceNumber, CurrentSellerManager.ShopId))
            {
                return(Json(new { success = false, msg = "该营业执照号已存在!" }));
            }

            //公司信息
            Mall.DTO.Shop shopInfo = ShopApplication.GetShop(CurrentSellerManager.ShopId);
            shopInfo.Id                         = CurrentSellerManager.ShopId;
            shopInfo.CompanyName                = shopProfileStep1.CompanyName;
            shopInfo.CompanyAddress             = shopProfileStep1.Address;
            shopInfo.CompanyRegionId            = shopProfileStep1.CityRegionId;
            shopInfo.CompanyRegionAddress       = shopProfileStep1.Address;
            shopInfo.CompanyPhone               = shopProfileStep1.Phone;
            shopInfo.CompanyEmployeeCount       = shopProfileStep1.EmployeeCount;
            shopInfo.CompanyRegisteredCapital   = shopProfileStep1.RegisterMoney;
            shopInfo.ContactsName               = shopProfileStep1.ContactName;
            shopInfo.ContactsPhone              = shopProfileStep1.ContactPhone;
            shopInfo.ContactsEmail              = shopProfileStep1.Email;
            shopInfo.BusinessLicenceNumber      = shopProfileStep1.BusinessLicenceNumber;
            shopInfo.BusinessLicenceRegionId    = shopProfileStep1.BusinessLicenceArea;
            shopInfo.BusinessLicenceStart       = shopProfileStep1.BusinessLicenceValidStart;
            shopInfo.BusinessLicenceEnd         = shopProfileStep1.BusinessLicenceValidEnd;
            shopInfo.BusinessSphere             = shopProfileStep1.BusinessSphere;
            shopInfo.BusinessLicenceNumberPhoto = shopProfileStep1.BusinessLicenceNumberPhoto;
            shopInfo.OrganizationCode           = shopProfileStep1.OrganizationCode;
            shopInfo.OrganizationCodePhoto      = shopProfileStep1.OrganizationCodePhoto;
            shopInfo.GeneralTaxpayerPhot        = shopProfileStep1.GeneralTaxpayerPhoto;
            shopInfo.Stage                      = Entities.ShopInfo.ShopStage.CompanyInfo;
            shopInfo.BusinessLicenseCert        = Request.Form["BusinessLicenseCert"];
            shopInfo.ProductCert                = Request.Form["ProductCert"];
            shopInfo.OtherCert                  = Request.Form["OtherCert"];
            shopInfo.legalPerson                = shopProfileStep1.legalPerson;
            shopInfo.CompanyFoundingDate        = shopProfileStep1.CompanyFoundingDate;

            ShopApplication.UpdateShop(shopInfo);

            //管理员信息
            long uid    = ShopApplication.GetShopManagers(CurrentSellerManager.ShopId);
            var  mTheme = ShopApplication.GetSettled();
            var  model  = MemberApplication.GetMemberAccountSafety(uid);

            if (!mTheme.CompanyVerificationType.Equals(VerificationType.VerifyEmail) && shopProfileStep1.MemberPhone.Equals(""))
            {
                return(Json(new { success = false, msg = "必须认证手机!" }));
            }
            if (!mTheme.CompanyVerificationType.Equals(Mall.CommonModel.VerificationType.VerifyPhone) && shopProfileStep1.MemberEmail.Equals(""))
            {
                return(Json(new { success = false, msg = "必须认证邮箱!" }));
            }

            //修改真实姓名
            var member = MemberApplication.GetMembers(uid);

            member.RealName = shopProfileStep1.RealName;
            MemberApplication.UpdateMember(member);

            //手机认证
            if (!shopProfileStep1.MemberPhone.Equals(model.Phone))
            {
                string pluginId = "Mall.Plugin.Message.SMS";
                int    result   = MemberApplication.CheckMemberCode(pluginId, shopProfileStep1.PhoneCode, shopProfileStep1.MemberPhone, uid);
                string strMsg   = "";
                switch (result)
                {
                case 0: strMsg = "手机验证码错误!"; break;

                case -1: strMsg = "此手机号已绑定!"; break;
                }
                if (!strMsg.Equals(""))
                {
                    return(Json(new { success = false, msg = strMsg }));
                }
            }

            //邮箱认证
            if (!shopProfileStep1.MemberEmail.Equals(model.Email))
            {
                string pluginId = "Mall.Plugin.Message.Email";
                int    result   = MemberApplication.CheckMemberCode(pluginId, shopProfileStep1.EmailCode, shopProfileStep1.MemberEmail, uid);
                string strMsg   = "";
                switch (result)
                {
                case 0: strMsg = "邮箱验证码错误!"; break;

                case -1: strMsg = "此邮箱已绑定!"; break;
                }
                if (!strMsg.Equals(""))
                {
                    return(Json(new { success = false, msg = strMsg }));
                }
            }

            ShopApplication.SetShopStage(Entities.ShopInfo.ShopStage.FinancialInfo, CurrentSellerManager.ShopId);//设置成功,则才是进入财务信息

            return(Json(new { success = true, msg = "成功!" }));
        }