public JsonResult Setting(bool autoAllotOrder) { try { Himall.DTO.Shop info = ShopApplication.GetShop(CurrentSellerManager.ShopId); info.AutoAllotOrder = autoAllotOrder; ShopApplication.UpdateShop(info); Cache.Remove(CacheKeyCollection.CACHE_SHOPDTO(CurrentSellerManager.ShopId, false)); Cache.Remove(CacheKeyCollection.CACHE_SHOP(CurrentSellerManager.ShopId, false)); ServiceHelper.Create <IOperationLogService>().AddSellerOperationLog( new LogInfo { Date = DateTime.Now, Description = string.Format("{0}:订单自动分配到门店", autoAllotOrder ? "开启" : "关闭"), IPAddress = Request.UserHostAddress, PageUrl = "/ShopBranch/Setting", UserName = CurrentSellerManager.UserName, ShopId = CurrentSellerManager.ShopId }); return(Json(new { success = true })); } catch (Exception e) { return(Json(new { success = false, msg = e.Message })); } }
/// <summary> /// 商店信息更新 /// </summary> /// <param name="model"></param> public static void UpdateShop(Himall.DTO.Shop model) { var mShop = Mapper.Map <Himall.DTO.Shop, Himall.Model.ShopInfo>(model); _iShopService.UpdateShop(mShop); Cache.Remove(CacheKeyCollection.CACHE_SHOPDTO(model.Id, false)); Cache.Remove(CacheKeyCollection.CACHE_SHOPDTO(model.Id, true)); }
public JsonResult EditProfile4(string payOrderPhoto, string remark) { Himall.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 })); }
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 EditProfile2(ShopProfileStep2 shopProfileStep2) { Himall.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 })); }
public JsonResult EditProfile2(ShopProfileStep2 shopProfileStep2) { 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.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 = ShopInfo.ShopStage.ShopInfo; ShopApplication.UpdateShop(shopInfo); return(Json(new { success = true })); }
/// <summary> /// 商店信息更新 /// </summary> /// <param name="model"></param> public static void UpdateShop(Himall.DTO.Shop model) { Mapper.CreateMap <Himall.DTO.Shop, Himall.Model.ShopInfo>(); Himall.Model.ShopInfo mShop = Mapper.Map <Himall.DTO.Shop, Himall.Model.ShopInfo>(model); _iShopService.UpdateShop(mShop); }
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 = "该营业执照号已存在!" })); } //公司信息 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.CompanyPhone = shopProfileStep1.Phone; shopInfo.CompanyEmployeeCount = (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 = ShopInfo.ShopStage.FinancialInfo; 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 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.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) { //公司信息 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 = 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(Himall.CommonModel.VerificationType.VerifyEmail) && shopProfileStep1.MemberPhone.Equals("")) { return(Json(new { success = false, msg = "必须认证手机!" })); } if (!mTheme.SelfVerificationType.Equals(Himall.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 = "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 })); } } //邮箱认证 if (shopProfileStep1.MemberEmail != null && !shopProfileStep1.MemberEmail.ToString().Equals(model.Email)) { string pluginId = "Himall.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 = "成功!" })); }