コード例 #1
0
        public object GetSubmitByCartModel(string cartItemIds = "")
        {
            this.CheckUserLogin();
            MobileOrderDetailConfirmModel mobileSubmiteByCart = OrderApplication.GetMobileSubmiteByCart(this.CurrentUserId, cartItemIds);

            if (mobileSubmiteByCart.shopBranchInfo == null)
            {
                throw new HimallException("获取门店信息失败,不可提交非门店商品");
            }
            ShopBranch shopBranchById = ShopBranchApplication.GetShopBranchById(mobileSubmiteByCart.shopBranchInfo.Id);
            object     obj1           = (object)new ExpandoObject();
            object     obj2;

            if (mobileSubmiteByCart.Address != null)
            {
                string str = mobileSubmiteByCart.Address.AddressDetail ?? "";
                var    fAnonymousType30 = new
                {
                    Id       = mobileSubmiteByCart.Address.Id,
                    ShipTo   = mobileSubmiteByCart.Address.ShipTo,
                    Phone    = mobileSubmiteByCart.Address.Phone,
                    Address  = mobileSubmiteByCart.Address.RegionFullName + " " + mobileSubmiteByCart.Address.Address + " " + str,
                    RegionId = mobileSubmiteByCart.Address.RegionId
                };
                obj2 = (object)fAnonymousType30;
            }
            else
            {
                obj2 = (object)null;
            }
            return((object)this.Json(new
            {
                Success = "true",
                Address = obj2,
                IsCashOnDelivery = mobileSubmiteByCart.IsCashOnDelivery,
                InvoiceContext = mobileSubmiteByCart.InvoiceContext,
                InvoiceTitle = OrderApplication.GetInvoiceTitles(this.CurrentUserId),
                products = mobileSubmiteByCart.products,
                integralPerMoney = mobileSubmiteByCart.integralPerMoney,
                userIntegrals = mobileSubmiteByCart.userIntegrals,
                TotalAmount = mobileSubmiteByCart.totalAmount,
                Freight = mobileSubmiteByCart.Freight,
                orderAmount = mobileSubmiteByCart.orderAmount,
                shopBranchInfo = shopBranchById,
                IsOpenStore = SiteSettingApplication.GetSiteSettings() != null && SiteSettingApplication.GetSiteSettings().IsOpenStore,
                capitalAmount = mobileSubmiteByCart.capitalAmount
            }));
        }