/// <summary> /// 个人入驻第二部信息 /// </summary> /// <param name="id"></param> /// <param name="CompanyRegionId"></param> /// <param name="BusinessLicenceRegionId"></param> /// <param name="RefuseReason"></param> /// <returns></returns> public static ShopProfileSteps1 GetShopProfileSteps1(long id, out long CompanyRegionId, out long BusinessLicenceRegionId, out string RefuseReason) { var shop = Service.GetShop(id); var step1 = new ShopProfileSteps1(); step1.Address = shop.CompanyAddress; step1.CityRegionId = shop.CompanyRegionId; step1.CompanyName = shop.CompanyName; step1.IDCard = shop.IDCard; step1.IDCardUrl = shop.IDCardUrl; step1.IDCardUrl2 = shop.IDCardUrl2; step1.BusinessType = shop.BusinessType; step1.Settled = GetSettled(); CompanyRegionId = shop.CompanyRegionId; BusinessLicenceRegionId = shop.BusinessLicenceRegionId; RefuseReason = null; if (shop.ShopStatus == Entities.ShopInfo.ShopAuditStatus.Refuse) { RefuseReason = shop.RefuseReason; } return(step1); }
public JsonResult EditProfiles1(ShopProfileSteps1 shopProfileStep1) { //公司信息 Cache.Remove(CacheKeyCollection.CACHE_SHOP(CurrentSellerManager.ShopId, false)); Cache.Remove(CacheKeyCollection.CACHE_SHOPDTO(CurrentSellerManager.ShopId, false)); Himall.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 = ShopInfo.ShopStage.FinancialInfo; 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 model = MemberApplication.GetMemberAccountSafety(uid); if (shopProfileStep1.MemberPhone.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 = "Himall.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 })); } } return(Json(new { success = true, msg = "成功!" })); }
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 = "成功!" })); }