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