コード例 #1
0
        /// <summary>
        /// 满减营销活动费用设置
        /// </summary>
        /// <returns></returns>
        public static decimal GetMarketServicePrice()
        {
            var marketser = MarketApplication.GetServiceSetting(CurMarketType);

            if (marketser == null)
            {
                marketser = SetMarketServicePrice(0.00m);
            }
            return(marketser.Price);
        }
コード例 #2
0
        /// <summary>
        /// 是否已开启拼团营销
        /// </summary>
        /// <returns></returns>
        public static bool IsOpenMarketService()
        {
            bool result    = false;
            var  marketser = MarketApplication.GetServiceSetting(CurMarketType);

            if (marketser != null)
            {
                if (marketser.Price >= 0)
                {
                    result = true;
                }
            }
            return(result);
        }
コード例 #3
0
        /// <summary>
        /// 拼团营销活动费用设置
        /// </summary>
        /// <returns></returns>
        public static decimal GetMarketServicePrice()
        {
            var marketser = MarketApplication.GetServiceSetting(CurMarketType);

            if (marketser == null)
            {
                marketser = new Entities.MarketSettingInfo()
                {
                    TypeId = CurMarketType, Price = 0
                };
                MarketApplication.AddOrUpdateServiceSetting(marketser);
            }
            return(marketser.Price);
        }
コード例 #4
0
        /// <summary>
        /// 获取拼团营销服务
        /// </summary>
        /// <param name="shopId"></param>
        /// <returns></returns>
        public static MarketServiceModel GetMarketService(long shopId)
        {
            MarketServiceModel result = new MarketServiceModel();
            var market    = MarketApplication.GetMarketService(shopId, CurMarketType);
            var marketser = MarketApplication.GetServiceSetting(CurMarketType);

            result.LastBuyPrice = -1;
            if (marketser != null)
            {
                if (marketser.Price >= 0)
                {
                    result.ShopId     = shopId;
                    result.Price      = marketser.Price;
                    result.MarketType = CurMarketType;
                    if (market != null && market.Id > 0)
                    {
                        result.EndTime      = MarketApplication.GetServiceEndTime(market.Id);
                        result.LastBuyPrice = MarketApplication.GetLastBuyPrice(market.Id);
                    }
                }
            }
            return(result);
        }