public JsonResult DealRefund(long refundId, int auditStatus, string sellerRemark)
        {
            Result result            = new Result();
            var    refundauditstatus = (Entities.OrderRefundInfo.OrderRefundAuditStatus)auditStatus;

            switch (refundauditstatus)
            {
            case Entities.OrderRefundInfo.OrderRefundAuditStatus.UnAudit:
                if (string.IsNullOrWhiteSpace(sellerRemark))
                {
                    throw new HimallException("请填写拒绝理由");
                }
                break;
            }
            var refund = RefundApplication.GetOrderRefund(refundId);

            if (refund != null && refund.IsReturn == true && auditStatus == 2)
            {
                var shopget = ShopShippersApplication.GetDefaultGetGoodsShipper(refund.ShopId);
                if (shopget == null)
                {
                    throw new HimallException("需要先设置好退货地址再进行操作,立即前往设置!");
                }
            }
            _iRefundService.SellerDealRefund(refundId, refundauditstatus, sellerRemark, CurrentSellerManager.UserName);
            result.success = true;
            return(Json(result));
        }
 public object GetShopGetAddress(long shopId, long shopBranchId = 0)
 {
     if (shopBranchId <= 0)
     {
         var data = ShopShippersApplication.GetDefaultGetGoodsShipper(shopId);
         if (data == null)
         {
             data = new DTO.ShopShipper()
             {
             };
         }
         else
         {
             data.RegionStr = RegionApplication.GetFullName(data.RegionId);
         }
         var model = new
         {
             success     = true,
             Region      = data.RegionStr,
             Address     = data.Address,
             Phone       = data.TelPhone,
             ShipperName = data.ShipperName
         };
         return(model);
     }
     else
     {
         var    data      = ShopBranchApplication.GetShopBranchById(shopBranchId);
         string redionstr = "";
         if (data != null)
         {
             redionstr = RegionApplication.GetFullName(data.AddressId);
         }
         var model = new
         {
             success     = true,
             Region      = redionstr,
             Address     = data.AddressDetail,
             Phone       = data.ContactPhone,
             ShipperName = data.ContactUser
         };
         return(model);
     }
 }
示例#3
0
 public JsonResult GetShopGetAddress(long shopId, long shopBranchId = 0)
 {
     if (shopBranchId <= 0)
     {
         var data = ShopShippersApplication.GetDefaultGetGoodsShipper(shopId);
         if (data == null)
         {
             data = new DTO.ShopShipper()
             {
             };
         }
         else
         {
             data.RegionStr = RegionApplication.GetFullName(data.RegionId);
         }
         var model = new
         {
             Region      = string.IsNullOrEmpty(data.RegionStr) ? "" : data.RegionStr,
             Address     = string.IsNullOrEmpty(data.Address) ? "" : data.Address,
             Phone       = string.IsNullOrEmpty(data.TelPhone) ? "" : data.TelPhone,
             ShipperName = string.IsNullOrEmpty(data.ShipperName) ? "" : data.ShipperName
         };
         return(Json <dynamic>(true, data: model));
     }
     else
     {
         var    data      = ShopBranchApplication.GetShopBranchById(shopBranchId);
         string redionstr = "";
         if (data != null)
         {
             redionstr = RegionApplication.GetFullName(data.AddressId);
         }
         var model = new
         {
             Region      = redionstr,
             Address     = data == null ? "" : data.AddressDetail,
             Phone       = data == null ? "" : data.ContactPhone,
             ShipperName = data == null ? "" : data.ContactUser
         };
         return(Json <dynamic>(true, data: model));
     }
 }