/// <summary> /// 获取会员认证情况 /// </summary> /// <param name="UserId">会员ID</param> /// <returns></returns> public static Himall.DTO.MemberAccountSafety GetMemberAccountSafety(long UserId) { Himall.DTO.MemberAccountSafety model = new Himall.DTO.MemberAccountSafety(); model.UserId = UserId; List <Himall.Model.MemberContactsInfo> lmMemberContactsInfo = _iMessageService.GetMemberContactsInfo(UserId); foreach (Himall.Model.MemberContactsInfo item in lmMemberContactsInfo) { if (item.ServiceProvider.Contains("SMS")) { model.Phone = item.Contact; model.BindPhone = true; } else if (item.ServiceProvider.Contains("Email")) { model.Email = item.Contact; model.BindEmail = true; } } return(model); }
public JsonResult AddOrderComplaint(Himall.Entities.OrderComplaintInfo model) { model.UserId = CurrentUser.Id; model.UserName = CurrentUser.UserName; model.ComplaintDate = DateTime.Now; model.Status = Himall.Entities.OrderComplaintInfo.ComplaintStatus.WaitDeal; var shop = _iShopService.GetShop(model.ShopId); var order = _iOrderService.GetOrder(model.OrderId, CurrentUser.Id); if (model.ComplaintReason.Length < 5) { throw new HimallException("投诉内容不能小于5个字符!"); } if (model.ComplaintReason.Length > 500) { throw new HimallException("字数过长,限制500个字!"); } if (string.IsNullOrWhiteSpace(model.UserPhone)) { throw new HimallException("投诉电话不能为空!"); } if (order == null || order.ShopId != model.ShopId) { throw new HimallException("该订单不属于当前用户!"); } model.ShopName = shop == null ? "" : shop.ShopName; model.ShopPhone = shop == null ? "" : shop.CompanyPhone; if (model.ShopPhone == null) { //管理员信息 long uid = Himall.Application.ShopApplication.GetShopManagers(shop.Id); Himall.DTO.MemberAccountSafety mMemberAccountSafety = Himall.Application.MemberApplication.GetMemberAccountSafety(uid); model.ShopPhone = mMemberAccountSafety.Phone; } model.ShopName = model.ShopName == null ? "" : model.ShopName; _iComplaintService.AddComplaint(model); return(Json(new { success = true, msg = "提交成功" }, JsonRequestBehavior.AllowGet)); }
public ActionResult ShopDetail() { //Note:DZY[151010] 有form数据返回,传参暂时不能改 var shopid = CurrentSellerManager.ShopId; var shop = _iShopService.GetShop(shopid, true); var model = new ShopModel(shop); model.BusinessCategory = new List <CategoryKeyVal>(); foreach (var key in shop.BusinessCategory.Keys) { model.BusinessCategory.Add(new CategoryKeyVal { CommisRate = shop.BusinessCategory[key], Name = _iCategoryService.GetCategory(key).Name }); } ViewBag.CompanyRegionIds = _iRegionService.GetRegionPath(shop.CompanyRegionId); ViewBag.BusinessLicenseCert = shop.BusinessLicenseCert; //var model= _iShopService.GetShopBasicInfo(shopid); string businessLicenseCerts = ""; string productCerts = ""; string otherCerts = ""; for (int i = 0; i < 3; i++) { if (HimallIO.ExistFile(shop.BusinessLicenseCert + string.Format("{0}.png", i + 1))) { businessLicenseCerts += HimallIO.GetImagePath(shop.BusinessLicenseCert + string.Format("{0}.png", i + 1)) + ","; } else { businessLicenseCerts += "null,"; } if (HimallIO.ExistFile(shop.ProductCert + string.Format("{0}.png", i + 1))) { productCerts += HimallIO.GetImagePath(shop.ProductCert + string.Format("{0}.png", i + 1)) + ","; } else { productCerts += "null,"; } if (HimallIO.ExistFile(shop.OtherCert + string.Format("{0}.png", i + 1))) { otherCerts = HimallIO.GetImagePath(shop.OtherCert + string.Format("{0}.png", i + 1)) + ","; } else { otherCerts += "null,"; } } ViewBag.BusinessLicenseCerts = businessLicenseCerts.TrimEnd(','); ViewBag.ProductCerts = productCerts.TrimEnd(','); ViewBag.OtherCerts = otherCerts.TrimEnd(','); //管理员信息 long uid = ShopApplication.GetShopManagers(CurrentSellerManager.ShopId); var mUser = MemberApplication.GetMembers(uid); ViewBag.RealName = mUser.RealName; Himall.DTO.MemberAccountSafety mMemberAccountSafety = MemberApplication.GetMemberAccountSafety(uid); ViewBag.MemberEmail = mMemberAccountSafety.Email; ViewBag.MemberPhone = mMemberAccountSafety.Phone; if (model.BusinessType.Equals(Himall.CommonModel.ShopBusinessType.Enterprise)) { return(View(model)); } else { return(View("ShopPersonalDetail", model)); } }