public ActionResult UpRenew(ShopRenewRecordInfo model) { if (model == null) { return(Json(new Result() { success = false, msg = "更新对象为空" })); } model.OperateType = ShopRenewRecordInfo.EnumOperateType.Upgrade; model.Operator = CurrentSellerManager.UserName; model.OperateDate = DateTime.Now; if (model.Type == ShopRenewRecordInfo.EnumOperateType.ReNew) { model.OperateType = ShopRenewRecordInfo.EnumOperateType.ReNew; var shopInfo = _iShopService.GetShop(model.ShopId); if (shopInfo != null) { DateTime beginTime = shopInfo.EndDate; if (beginTime < DateTime.Now) { beginTime = DateTime.Now; } string strNewEndTime = beginTime.AddYears(model.Year).ToString("yyyy-MM-dd"); model.OperateContent = "续费 " + model.Year + " 年至 " + strNewEndTime; _iShopService.AddShopRenewRecord(model); _iShopService.ShopReNew(model.ShopId, model.Year); //店铺续费 ShopApplication.ClearCacheShop(CurrentSellerManager.ShopId); return(Json(new Result() { success = true })); } } else { var shopInfo = _iShopService.GetShop(model.ShopId); if (shopInfo != null) { var shopGrade = _iShopService.GetShopGrades().Where(c => c.Id == shopInfo.GradeId).FirstOrDefault(); var newshopGrade = _iShopService.GetShopGrades().Where(c => c.Id == model.GradeId).FirstOrDefault(); model.OperateContent = "将套餐‘" + shopGrade.Name + "'升级为套餐‘" + newshopGrade.Name + "'"; _iShopService.AddShopRenewRecord(model); _iShopService.ShopUpGrade(model.ShopId, model.GradeId); //店铺升级 ShopApplication.ClearCacheShop(CurrentSellerManager.ShopId); return(Json(new Result() { success = true })); } } return(Json(new Result() { success = false, msg = "操作失败" })); }
public JsonResult EditProfiles1(ShopProfileSteps1 shopProfileStep1) { ShopApplication.ClearCacheShop(CurrentSellerManager.ShopId); var 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.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 = "成功!" })); }
/// <summary> /// 店铺信息 /// </summary> /// <param name="ids">经营类目ID集</param> /// <returns></returns> public ActionResult Step5(string ids) { ShopApplication.ClearCacheShop(CurrentSellerManager.ShopId); var shop = ShopApplication.GetShop(CurrentSellerManager.ShopId, true); if (shop.Stage == Entities.ShopInfo.ShopStage.CompanyInfo) { return(RedirectToAction("step3")); } if (shop.Stage == Entities.ShopInfo.ShopStage.FinancialInfo) { return(RedirectToAction("step4")); } var step3 = new ShopProfileStep3(); step3.ShopName = shop.ShopName; step3.ShopGrade = shop.GradeId; var gradeInfo = ShopApplication.GetShopGrade(shop.GradeId); ViewBag.GradeName = gradeInfo != null ? gradeInfo.Name : "未选择";//获取等级名称 ViewBag.ShopBusinessCategory = "未选择"; ViewBag.BusinessCategoryIds = string.Empty; if (!string.IsNullOrWhiteSpace(ids)) { var idArr = ids.Split(','); if (idArr.Length > 0) { List <long> idList = idArr.Select(p => long.Parse(p)).ToList(); var categoriesList = _iCategoryService.GetCategories().Where(p => idList.Contains(p.Id)); if (categoriesList.Count() == idArr.Length) { string businessCategory = string.Join("、", categoriesList.Select(x => x.Name).ToArray()); ViewBag.ShopBusinessCategory = businessCategory.Length > 0 ? businessCategory : "未选择"; ViewBag.BusinessCategoryIds = ids; } } } else { var businessCategoryInfo = ShopApplication.GetBusinessCategory(CurrentSellerManager.ShopId); if (businessCategoryInfo != null && businessCategoryInfo.Count > 0) { List <long> categoryIds = businessCategoryInfo.Select(p => p.CategoryId).ToList(); ViewBag.BusinessCategoryIds = string.Join(",", categoryIds.ToArray()); string businessCategory = string.Join("、", _iCategoryService.GetCategories().Where(p => categoryIds.Contains(p.Id)).Select(x => x.Name).ToArray()); ViewBag.ShopBusinessCategory = businessCategory.Length > 0 ? businessCategory : "未选择"; } } return(View(step3)); }
public ActionResult Step6() { ShopApplication.ClearCacheShop(CurrentSellerManager.ShopId); var shop = ShopApplication.GetShop(CurrentSellerManager.ShopId, true); if (shop.ShopStatus == Entities.ShopInfo.ShopAuditStatus.Refuse) { ViewBag.SellerAdminAgreement = ShopApplication.GetSellerAgreement(); var model = ShopApplication.GetSettled(); return(View("step1", model)); } return(View()); }
/// <summary> /// 银行账户信息 /// </summary> /// <returns></returns> public ActionResult Step4() { ShopApplication.ClearCacheShop(CurrentSellerManager.ShopId); var Stage = Entities.ShopInfo.ShopStage.Agreement; var shop = ShopApplication.GetShopProfileStep2(CurrentSellerManager.ShopId, out Stage); if (Stage == Entities.ShopInfo.ShopStage.CompanyInfo) { return(RedirectToAction("step3")); } ViewBag.BankRegionIds = RegionApplication.GetRegionPath(shop.BankRegionId); ViewBag.fullName = RegionApplication.GetFullName(shop.BankRegionId); return(View(shop)); }
public JsonResult EditProfile2(ShopProfileStep2 shopProfileStep2) { ShopApplication.ClearCacheShop(CurrentSellerManager.ShopId); 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 AccountBalancePay(decimal balance, int type, int value) { if (balance <= 0) { return(Json(new Result() { success = false, msg = "应缴金额不正确" })); } var shopAccount = ShopApplication.GetShopAccount(CurrentSellerManager.ShopId); if (shopAccount == null) { return(Json(new Result() { success = false, msg = "店铺账户信息异常" })); } if (shopAccount.Balance < balance) //店铺余额不足以支付费用 { return(Json(new Result() { success = false, msg = "您的店铺余额为:" + shopAccount.Balance + "元,不足以支付此次费用,请先充值。" })); } string trandNo = shopAccount.ShopId + "" + new Random().Next(1000000); ShopApplication.ShopReNewPayNotify(trandNo, CurrentSellerManager.ShopId, CurrentSellerManager.UserName, balance, type, value, true); ShopApplication.ClearCacheShop(CurrentSellerManager.ShopId); return(Json(new Result() { success = true })); }