Esempio n. 1
0
 /// <summary>
 /// 获取拼团订单信息Model
 /// </summary>
 /// <param name="skuId"></param>
 /// <param name="count"></param>
 /// <param name="GroupActionId"></param>
 /// <param name="GroupId"></param>
 /// <returns></returns>
 public object GetGroupOrderModel(string skuId, int count, long GroupActionId, long?GroupId = null)
 {
     CheckUserLogin();
     Himall.DTO.MobileOrderDetailConfirmModel result = OrderApplication.SubmitByGroupId(CurrentUser.Id, skuId, count, GroupActionId, GroupId);
     if (result.Address != null)
     {
         result.Address.MemberInfo = new UserMemberInfo();
     }
     result.IsOpenStore = SiteSettingApplication.GetSiteSettings() != null && SiteSettingApplication.GetSiteSettings().IsOpenStore;
     return(result);
 }
Esempio n. 2
0
        /// <summary>
        /// 获取拼团订单信息Model
        /// </summary>
        /// <param name="skuId"></param>
        /// <param name="count"></param>
        /// <param name="GroupActionId"></param>
        /// <param name="GroupId"></param>
        /// <returns></returns>
        public object GetGroupOrderModel(string skuId, int count, long GroupActionId, long?GroupId = null)
        {
            CheckUserLogin();
            dynamic d = SuccessResult();

            Himall.DTO.MobileOrderDetailConfirmModel result = OrderApplication.SubmitByGroupId(CurrentUser.Id, skuId, count, GroupActionId, GroupId);
            if (result.Address != null)
            {
                //result.Address.MemberInfo = new UserMemberInfo();
                d.Address = result.Address;
            }

            bool canIntegralPerMoney = true, canCapital = true;

            CanDeductible(out canIntegralPerMoney, out canCapital);
            d.canIntegralPerMoney = canIntegralPerMoney;
            d.canCapital          = canCapital;

            d.IsOpenStore               = SiteSettingApplication.SiteSettings != null && SiteSettingApplication.SiteSettings.IsOpenStore;
            d.ProvideInvoice            = ShopApplication.HasProvideInvoice(result.products.Select(s => s.shopId).Distinct().ToList());
            d.products                  = result.products;
            d.totalAmount               = result.totalAmount;
            d.Freight                   = result.Freight;
            d.orderAmount               = result.orderAmount;
            d.integralPerMoney          = result.integralPerMoney;
            d.integralPerMoneyRate      = result.integralPerMoneyRate;
            d.userIntegralMaxDeductible = result.userIntegralMaxDeductible;
            d.IntegralDeductibleRate    = result.IntegralDeductibleRate;
            d.userIntegrals             = result.userIntegrals;
            d.capitalAmount             = result.capitalAmount;
            d.memberIntegralInfo        = result.memberIntegralInfo;
            //d.InvoiceContext = result.InvoiceContext;
            //d.InvoiceTitle = result.InvoiceTitle;
            d.InvoiceContext   = result.InvoiceContext; //发票类容
            d.InvoiceTitle     = result.InvoiceTitle;   //发票抬头
            d.cellPhone        = result.cellPhone;      //默认收票人手机
            d.email            = result.email;          //默认收票人邮箱
            d.vatInvoice       = result.vatInvoice;     //默认增值税发票
            d.invoiceName      = result.invoiceName;    //默认抬头(普通、电子)
            d.invoiceCode      = result.invoiceCode;    //默认税号(普通、电子)
            d.IsCashOnDelivery = result.IsCashOnDelivery;
            d.Sku            = result.Sku;
            d.Count          = result.Count;
            d.shopBranchInfo = result.shopBranchInfo;
            return(d);
        }