//检查优惠券id是否可用 public static CheckPidResult CheckCouponPid(string PID, DateTime beginDateTime, DateTime endDateTime) { var result = new CheckPidResult(); var dat = DALShareBargain.CheckBargainProductByPid(PID, beginDateTime, endDateTime); if (dat) { result.Code = 2; result.Info = "该优惠券已在活动中"; } else { using (var memberClient = new Tuhu.Service.Member.PromotionClient()) { if (!Guid.TryParse(PID, out Guid rr)) { result.Code = 4; result.Info = "优惠券pid格式错误"; return(result); } var couponInfo = memberClient.GetCouponRule(new Guid(PID)); if (!couponInfo.Success) { result.Code = 3; result.Info = "获取优惠券信息失败"; return(result); } result.Code = 1; result.Info = couponInfo.Result.PromotionName; } } return(result); }
public static CheckPidResult CheckPid(string PID, DateTime beginDateTime, DateTime endDateTime) { var result = new CheckPidResult(); var dat = DALShareBargain.CheckBargainProductByPid(PID, beginDateTime, endDateTime); if (dat) { result.Code = 2; result.Info = "该商品已在活动中"; } else { result = DALShareBargain.CheckProductByPid(PID); } return(result); }
public static bool DeleteBargainProductById(int PKID) => DALShareBargain.DeleteBargainProductById(PKID);
//修改砍价优惠券信息 public static bool UpdateBargainCouponById(ShareBargainProductModel request) => DALShareBargain.UpdateBargainCouponById(request);
public static ShareBargainProductModel FetchBargainProductById(int apId) => DALShareBargain.FetchBargainProductById(apId);
//添加砍价优惠券信息 public static bool AddSharBargainCoupon(ShareBargainProductModel request, string Operator) => DALShareBargain.AddSharBargainCoupon(request, Operator);
public static BargainGlobalConfigModel FetchBargainProductGlobalConfig() => DALShareBargain.FetchBargainProductGlobalConfig();
public static bool UpdateGlobalConfig(BargainGlobalConfigModel request) => DALShareBargain.UpdateGlobalConfig(request);
public static IEnumerable <ShareBargainItemModel> SelectBargainProductList(BargainProductRequest request, PagerModel pager) => DALShareBargain.SelectBargainProductList(request, pager);
public static IEnumerable <BackgroundThemeModel> GetBackgroundTheme() => DALShareBargain.GetBackgroundTheme();
public static int AddSharBargainProduct(ShareBargainProductModel request, string Operator) => DALShareBargain.AddSharBargainProduct(request, Operator);