Exemplo n.º 1
0
        //检查优惠券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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public static bool DeleteBargainProductById(int PKID)
 => DALShareBargain.DeleteBargainProductById(PKID);
Exemplo n.º 4
0
 //修改砍价优惠券信息
 public static bool UpdateBargainCouponById(ShareBargainProductModel request)
 => DALShareBargain.UpdateBargainCouponById(request);
Exemplo n.º 5
0
 public static ShareBargainProductModel FetchBargainProductById(int apId)
 => DALShareBargain.FetchBargainProductById(apId);
Exemplo n.º 6
0
 //添加砍价优惠券信息
 public static bool AddSharBargainCoupon(ShareBargainProductModel request, string Operator)
 => DALShareBargain.AddSharBargainCoupon(request, Operator);
Exemplo n.º 7
0
 public static BargainGlobalConfigModel FetchBargainProductGlobalConfig()
 => DALShareBargain.FetchBargainProductGlobalConfig();
Exemplo n.º 8
0
 public static bool UpdateGlobalConfig(BargainGlobalConfigModel request)
 => DALShareBargain.UpdateGlobalConfig(request);
Exemplo n.º 9
0
 public static IEnumerable <ShareBargainItemModel> SelectBargainProductList(BargainProductRequest request,
                                                                            PagerModel pager)
 => DALShareBargain.SelectBargainProductList(request, pager);
Exemplo n.º 10
0
 public static IEnumerable <BackgroundThemeModel> GetBackgroundTheme()
 => DALShareBargain.GetBackgroundTheme();
Exemplo n.º 11
0
 public static int AddSharBargainProduct(ShareBargainProductModel request, string Operator)
 => DALShareBargain.AddSharBargainProduct(request, Operator);