/// <summary> /// 满减营销活动费用设置 /// </summary> /// <returns></returns> public static decimal GetMarketServicePrice() { var marketser = MarketApplication.GetServiceSetting(CurMarketType); if (marketser == null) { marketser = SetMarketServicePrice(0.00m); } return(marketser.Price); }
/// <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); }
/// <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); }
/// <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); }