Esempio n. 1
0
        protected override GetKJEventJoinListRD ProcessRequest(APIRequest <GetKJEventJoinListRP> pRequest)
        {
            var rp  = pRequest.Parameters;
            var rd  = new GetKJEventJoinListRD();
            var Bll = new PanicbuyingKJEventJoinBLL(CurrentUserInfo);

            DataSet ds = Bll.GetKJEventJoinList(pRequest.UserID, rp.PageIndex, rp.PageSize);

            if (ds.Tables[0].Rows.Count > 0)
            {
                rd.KJEventJoinInfoList = new List <KJEventJoinInfo>();
                DataTable dt = ds.Tables[0];
                foreach (DataRow dr in dt.Rows)
                {
                    var Data = new KJEventJoinInfo();
                    Data.KJEventJoinId = dr["KJEventJoinId"].ToString();
                    Data.ItemName      = dr["item_name"].ToString();
                    Data.Price         = Convert.ToDecimal(dr["MinPrice"]);
                    Data.BasePrice     = Convert.ToDecimal(dr["MinBasePrice"]);
                    Data.ItemId        = dr["item_id"].ToString();
                    Data.Qty           = Convert.ToInt32(dr["Qty"]) - Convert.ToInt32(dr["SoldQty"]);
                    Data.EventId       = dr["EventId"].ToString();
                    Data.SkuID         = dr["SkuID"].ToString();
                    Data.VipId         = dr["VipId"].ToString();
                    if (dr["SalesPrice"] != DBNull.Value)
                    {
                        Data.SalesPrice = Convert.ToDecimal(dr["SalesPrice"]);
                    }
                    else
                    {
                        Data.SalesPrice = 0;
                    }
                    //
                    int      Status              = Convert.ToInt32(dr["EventStatus"]);
                    DateTime StareTime           = Convert.ToDateTime(dr["BeginTime"]);
                    DateTime KJStareTime         = Convert.ToDateTime(dr["CreateTime"]);
                    DateTime EndTime             = Convert.ToDateTime(dr["EndTime"]);
                    int      BargaingingInterval = Convert.ToInt32(dr["BargaingingInterval"]);
                    Data.Status       = GetSatus(Status, StareTime, KJStareTime, EndTime, BargaingingInterval);
                    Data.ItemImageURL = Bll.GetItemImageURL(dr["item_id"].ToString());//获取商品图片URL
                    //
                    rd.KJEventJoinInfoList.Add(Data);
                }
            }

            int remainder = 0;

            rd.TotalCount     = Convert.ToInt32(ds.Tables[1].Rows[0]["CountNum"]);
            rd.TotalPageCount = Math.DivRem(rd.TotalCount, rp.PageSize, out remainder);
            if (remainder > 0)
            {
                rd.TotalPageCount += 1;
            }

            return(rd);
        }
Esempio n. 2
0
        protected override GetBuyerListRD ProcessRequest(APIRequest <GetBuyerListRP> pRequest)
        {
            GetBuyerListRP            rp = pRequest.Parameters;
            GetBuyerListRD            rd = new GetBuyerListRD();
            PanicbuyingKJEventJoinBLL panicbuyingKJEventJoinBll = new PanicbuyingKJEventJoinBLL(CurrentUserInfo);

            DataSet ds = panicbuyingKJEventJoinBll.GetBuyerList(rp.EventId, rp.ItemId, rp.PageSize, rp.PageIndex);

            if (ds.Tables.Count > 0)
            {
                rd.BuyerList  = DataTableToObject.ConvertToList <Buyer>(ds.Tables[0]);
                rd.TotalCount = Convert.ToInt32(ds.Tables[1].Rows[0][0]);
                rd.TotalPage  = Convert.ToInt32(ds.Tables[1].Rows[0][0]);
            }
            return(rd);
        }
        protected override GetEventItemStatusRD ProcessRequest(APIRequest <GetEventItemStatusRP> pRequest)
        {
            GetEventItemStatusRP             rp = pRequest.Parameters;
            GetEventItemStatusRD             rd = new GetEventItemStatusRD();
            PanicbuyingKJEventJoinBLL        panicbuyingKJEventJoinbll        = new PanicbuyingKJEventJoinBLL(CurrentUserInfo);
            PanicbuyingEventBLL              panicbuyingEventbll              = new PanicbuyingEventBLL(CurrentUserInfo);
            PanicbuyingKJEventItemMappingBLL panicbuyingKJEventItemMappingBll = new PanicbuyingKJEventItemMappingBLL(CurrentUserInfo);

            rd.status = 0;

            var panicbuyingKJEventJoinEntity = panicbuyingKJEventJoinbll.GetByID(rp.KJEventJoinId);

            if (panicbuyingKJEventJoinEntity != null)
            {
                var panicbuyingEventEntity = panicbuyingEventbll.QueryByEntity(new PanicbuyingEventEntity()
                {
                    EventId = panicbuyingKJEventJoinEntity.EventId
                }, null).FirstOrDefault();
                if (panicbuyingEventEntity == null || panicbuyingEventEntity.EndTime < DateTime.Now || panicbuyingEventEntity.EventStatus == 10)
                {
                    rd.status = 2;
                }
                else
                {
                    if (panicbuyingKJEventJoinEntity.EventOrderMappingId != null)
                    {//已购买,返回状态4
                        rd.status = 4;
                    }

                    //活动已结束
                    var panicbuyingKJEventItemMappingEntity = panicbuyingKJEventItemMappingBll.QueryByEntity(new PanicbuyingKJEventItemMappingEntity()
                    {
                        EventId = panicbuyingKJEventJoinEntity.EventId, ItemID = panicbuyingKJEventJoinEntity.ItemId
                    }, null).FirstOrDefault();
                    bool isEnd = Convert.ToDateTime(panicbuyingKJEventJoinEntity.CreateTime).AddHours(Convert.ToDouble(panicbuyingKJEventItemMappingEntity.BargaingingInterval)) <= DateTime.Now ? true : false;
                    if (isEnd)
                    {
                        rd.status = 3;
                    }
                }
            }
            else
            {
                rd.status = 1;
            }
            return(rd);
        }
        protected override EmptyResponseData ProcessRequest(APIRequest <DeleteKJEventJoinRP> pRequest)
        {
            var rp     = pRequest.Parameters;
            var rd     = new EmptyResponseData();
            var Bll    = new PanicbuyingKJEventJoinBLL(CurrentUserInfo);
            var Result = Bll.GetByID(rp.KJEventJoinId);

            if (Result == null)
            {
                throw new APIException("未找到相关砍价参与主表信息,请确认参数")
                      {
                          ErrorCode = ERROR_CODES.INVALID_BUSINESS
                      }
            }
            ;

            Bll.Delete(Result);
            return(rd);
        }
    }
        protected override AddKJEventJoinDetailRD ProcessRequest(APIRequest <AddKJEventJoinDetailRP> pRequest)
        {
            var rp  = pRequest.Parameters;
            var rd  = new AddKJEventJoinDetailRD();
            var Bll = new PanicbuyingKJEventJoinDetailBLL(CurrentUserInfo);

            var PanicbuyingEventBll   = new PanicbuyingEventBLL(CurrentUserInfo);
            var EventSkuMappingBll    = new PanicbuyingKJEventSkuMappingBLL(CurrentUserInfo);
            var KJEventJoinBll        = new PanicbuyingKJEventJoinBLL(CurrentUserInfo);
            var KJEventItemMappingBll = new PanicbuyingKJEventItemMappingBLL(CurrentUserInfo);
            var pTran = Bll.GetTran();
            //
            var EventData = PanicbuyingEventBll.GetByID(rp.EventId);

            if (EventData == null)
            {
                throw new APIException("找不到砍价活动对象!")
                      {
                          ErrorCode = ERROR_CODES.INVALID_BUSINESS
                      }
            }
            ;
            //
            var EventItemData = KJEventItemMappingBll.QueryByEntity(new PanicbuyingKJEventItemMappingEntity()
            {
                EventId = new System.Guid(rp.EventId), ItemID = rp.ItemId
            }, null).FirstOrDefault();

            if (EventData == null)
            {
                throw new APIException("找不到砍价活动商品对象!")
                      {
                          ErrorCode = ERROR_CODES.INVALID_BUSINESS
                      }
            }
            ;
            //
            var EventSkuMappingData = EventSkuMappingBll.QueryByEntity(new PanicbuyingKJEventSkuMappingEntity()
            {
                EventItemMappingID = EventItemData.EventItemMappingID.ToString(), SkuID = rp.SkuId
            }, null).FirstOrDefault();

            if (EventSkuMappingData == null)
            {
                throw new APIException("找不到砍价活动商品Sku关系对象!")
                      {
                          ErrorCode = ERROR_CODES.INVALID_BUSINESS
                      }
            }
            ;
            //
            var KJEventJoinData = KJEventJoinBll.GetByID(rp.KJEventJoinId);

            if (KJEventJoinData == null)
            {
                throw new APIException("找不到砍价参与主表对象!")
                      {
                          ErrorCode = ERROR_CODES.INVALID_BUSINESS
                      }
            }
            ;
            //判断重复帮砍
            var Collection = Bll.QueryByEntity(new PanicbuyingKJEventJoinDetailEntity()
            {
                KJEventJoinId = KJEventJoinData.KJEventJoinId, VipId = pRequest.UserID
            }, null).ToList();

            if (Collection.Count > 0)
            {
                throw new APIException("您已经帮砍过了,不能重复帮砍!")
                      {
                          ErrorCode = ERROR_CODES.INVALID_BUSINESS
                      }
            }
            ;
            #region  价业务处理
            //当前成交价
            decimal NowMoney = KJEventJoinData.SalesPrice.Value;
            if (NowMoney == EventSkuMappingData.BasePrice)
            {
                throw new APIException("已经砍到底价,不能继续砍价!")
                      {
                          ErrorCode = ERROR_CODES.INVALID_BUSINESS
                      }
            }
            ;
            if (EventSkuMappingData.BargainStartPrice == null || EventSkuMappingData.BargainEndPrice == null)
            {
                throw new APIException("砍价起始、结束区间值不能为Null,错误数据!")
                      {
                          ErrorCode = ERROR_CODES.INVALID_BUSINESS
                      }
            }
            ;
            //
            Random ran   = new Random();
            int    start = Convert.ToInt32(EventSkuMappingData.BargainStartPrice);
            int    End   = Convert.ToInt32(EventSkuMappingData.BargainEndPrice);
            int    math  = ran.Next(start, End);
            //砍价后的价格
            decimal Result = NowMoney - Convert.ToDecimal(math);
            if (Result < EventSkuMappingData.BasePrice)
            {//如果Result小于底价,那Result赋值为底价金额值
                Result = EventSkuMappingData.BasePrice.Value;
            }
            //砍了多少
            decimal BargainPrice = NowMoney - Result;
            //赋值
            rd.BargainPrice = BargainPrice;
            #endregion

            using (pTran.Connection)
            {
                try
                {
                    //添加砍价参与者信息
                    var AddData = new PanicbuyingKJEventJoinDetailEntity();
                    AddData.KJEventJoinDetailId = System.Guid.NewGuid();
                    AddData.KJEventJoinId       = KJEventJoinData.KJEventJoinId;
                    AddData.EventId             = new System.Guid(rp.EventId);
                    AddData.ItemId           = rp.ItemId;
                    AddData.SkuId            = rp.SkuId;
                    AddData.VipId            = pRequest.UserID;
                    AddData.BargainPrice     = BargainPrice;
                    AddData.MomentSalesPrice = Result;
                    AddData.CustomerId       = CurrentUserInfo.ClientID;
                    //
                    Bll.Create(AddData, pTran);
                    //更新参与主表帮砍统计、成交价
                    KJEventJoinData.BargainPersonCount  = KJEventJoinData.BargainPersonCount ?? 0;
                    KJEventJoinData.BargainPersonCount += 1;
                    KJEventJoinData.SalesPrice          = KJEventJoinData.SalesPrice ?? 0;
                    KJEventJoinData.SalesPrice          = Result;
                    KJEventJoinBll.Update(KJEventJoinData, pTran);
                    //更新砍价活动表帮砍人数统记
                    EventData.BargainPersonCount += 1;
                    PanicbuyingEventBll.Update(EventData, pTran);
                    //更新活动商品帮砍人数统计
                    EventItemData.BargainPersonCount  = EventItemData.BargainPersonCount ?? 0;
                    EventItemData.BargainPersonCount += 1;
                    KJEventItemMappingBll.Update(EventItemData, pTran);
                    //提交
                    pTran.Commit();
                }
                catch (APIException ex)
                {
                    pTran.Rollback();
                    throw ex;
                }
            }
            return(rd);
        }
    }
}
        protected override GetPanicbuyingKJItemDetailRD ProcessRequest(APIRequest <GetPanicBuyingKJItemDetailRP> pRequest)
        {
            GetPanicBuyingKJItemDetailRP rp = pRequest.Parameters;
            GetPanicbuyingKJItemDetailRD rd = new GetPanicbuyingKJItemDetailRD();

            OnlineShoppingItemBLL itemService    = new OnlineShoppingItemBLL(CurrentUserInfo);
            ItemService           itemServiceBll = new ItemService(CurrentUserInfo);
            var customerBasicSettingBll          = new CustomerBasicSettingBLL(CurrentUserInfo);
            var panicbuyingEventBll = new PanicbuyingEventBLL(CurrentUserInfo);
            var panicbuyingKJEventItemMappingBll = new PanicbuyingKJEventItemMappingBLL(CurrentUserInfo);
            var panicbuyingKJEventSkuMappingBll  = new PanicbuyingKJEventSkuMappingBLL(CurrentUserInfo);
            var panicbuyingKJEventJoinBll        = new PanicbuyingKJEventJoinBLL(CurrentUserInfo);
            var panicbuyingKJEventJoinDetailBll  = new PanicbuyingKJEventJoinDetailBLL(CurrentUserInfo);
            var vipBll = new VipBLL(CurrentUserInfo);

            var vipEntity = vipBll.GetByID(pRequest.UserID);

            if (vipEntity != null)
            {
                rd.HeadImageUrl = vipEntity.HeadImgUrl;
            }

            #region 判断是否已经参与
            rd.isPromoted = 0;
            if (!string.IsNullOrEmpty(rp.KJEventJoinId))
            {
                var panicbuyingKJEventJoinEntity = panicbuyingKJEventJoinBll.GetByID(rp.KJEventJoinId);
                if (panicbuyingKJEventJoinEntity == null)
                {
                    rd.isPromoted = 0;
                }
                else
                {
                    rd.isPromoted = 1;

                    var VipData = vipBll.GetByID(panicbuyingKJEventJoinEntity.VipId);
                    rd.HeadImageUrl = VipData.HeadImgUrl;
                }
            }
            #endregion

            //为复用原来接口所设置参数
            DateTime dtBeginTime = Convert.ToDateTime("9999/01/01");
            DateTime dtEndTime   = Convert.ToDateTime("9999/01/01");


            #region  价活动商品基本信息
            KJEventItemDetailInfo eventItemInfo = panicbuyingEventBll.GetKJEventWithItemDetail(rp.EventId, rp.ItemId);
            if (eventItemInfo != null)
            {
                rd.ItemId             = eventItemInfo.ItemId;
                rd.ItemName           = eventItemInfo.ItemName;
                rd.MinPrice           = eventItemInfo.MinPrice;
                rd.MinBasePrice       = eventItemInfo.MinBasePrice;
                rd.SinglePurchaseQty  = eventItemInfo.SinglePurchaseQty;
                rd.PromotePersonCount = eventItemInfo.PromotePersonCount;
                rd.CurrentQty         = eventItemInfo.CurrentQty;
                rd.SoldQty            = eventItemInfo.SoldQty;
                rd.EventEndTime       = eventItemInfo.EventEndTime.ToString("yyyy-MM-dd HH:mm:ss");
                rd.Seconds            = Convert.ToInt64(eventItemInfo.EventEndTime.Subtract(DateTime.Now).TotalSeconds < 0 ? 0 : eventItemInfo.EventEndTime.Subtract(DateTime.Now).TotalSeconds);
                rd.PropName1          = eventItemInfo.Prop1Name;
                rd.PropName2          = eventItemInfo.Prop2Name;
                rd.ItemIntroduce      = eventItemInfo.ItemIntroduce;

                #endregion

                #region
                if (eventItemInfo.EventEndTime < DateTime.Now)
                {
                    rd.isEventEnd = 0;
                }
                else if (eventItemInfo.EventBeginTime > DateTime.Now)
                {//活动未开始
                    rd.isEventEnd = 2;
                    rd.Seconds    = Convert.ToInt64(eventItemInfo.EventBeginTime.Subtract(DateTime.Now).TotalSeconds < 0 ? 0 : eventItemInfo.EventBeginTime.Subtract(DateTime.Now).TotalSeconds);
                }
                else
                {
                    rd.isEventEnd = 1;
                }
                #endregion

                #region 商品图片
                var dsImages = itemService.GetItemImageList(rp.ItemId);
                if (dsImages != null && dsImages.Tables.Count > 0 && dsImages.Tables[0].Rows.Count > 0)
                {
                    rd.ImageList = DataTableToObject.ConvertToList <ImageInfo>(dsImages.Tables[0]);
                }
                #endregion

                #region 商品详情页
                if (rp.type == 1)
                {
                    #region 关于商品所有Sku信息
                    var dsSkus = itemServiceBll.GetItemSkuList(rp.ItemId, pRequest.UserID, pRequest.CustomerID, dtBeginTime, dtEndTime);
                    var panicbuyingKJEventSkuMappingList = panicbuyingKJEventSkuMappingBll.QueryByEntity(new PanicbuyingKJEventSkuMappingEntity()
                    {
                        EventItemMappingID = eventItemInfo.EventItemMappingID
                    }, null).ToList();
                    if (dsSkus != null && dsSkus.Tables.Count > 0 && dsSkus.Tables[0].Rows.Count > 0)
                    {
                        rd.SkuInfoList = DataTableToObject.ConvertToList <ItemSkuInfo>(dsSkus.Tables[0]);
                    }
                    rd.SkuInfoList = rd.SkuInfoList.Join(panicbuyingKJEventSkuMappingList, n => n.skuId, m => m.SkuID, (n, m) => new ItemSkuInfo()
                    {
                        skuId      = n.skuId,
                        skuProp1   = n.skuProp1,
                        skuProp2   = n.skuProp2,
                        BasePrice  = m.BasePrice.ToString(),
                        price      = m.Price.ToString(),
                        SalesCount = m.SoldQty.ToString(),
                        Stock      = (m.Qty - m.SoldQty).ToString(),
                    }).Distinct().ToList();
                    #endregion

                    #region 商品属性
                    var dsProp1 = panicbuyingKJEventItemMappingBll.GetKJItemProp1List(rp.ItemId, rp.EventId);
                    if (dsProp1 != null && dsProp1.Tables.Count > 0 && dsProp1.Tables[0].Rows.Count > 0)
                    {
                        rd.Prop1List = DataTableToObject.ConvertToList <SkuProp1>(dsProp1.Tables[0]);
                    }
                    #endregion
                    rd.status = 1;
                }
                #endregion

                #region 帮砍页面
                if (rp.type == 2 && rd.isPromoted == 1)
                {
                    if (!string.IsNullOrEmpty(rp.SkuId))
                    {
                        KJItemSkuInfo kJItemSkuInfo = panicbuyingKJEventSkuMappingBll.GetKJItemSkuInfo(rp.EventId, rp.SkuId, rp.KJEventJoinId);
                        rd.SkuInfoList = new List <ItemSkuInfo>();

                        ItemSkuInfo itemSkuInfo = new ItemSkuInfo();
                        itemSkuInfo.skuId    = kJItemSkuInfo.skuId;
                        itemSkuInfo.skuProp1 = kJItemSkuInfo.skuProp1;
                        itemSkuInfo.skuProp2 = kJItemSkuInfo.skuProp2;
                        itemSkuInfo.price    = kJItemSkuInfo.price.ToString();
                        itemSkuInfo.Stock    = kJItemSkuInfo.Stock;
                        rd.SkuInfoList.Add(itemSkuInfo);

                        rd.BargainedPrice    = kJItemSkuInfo.price - kJItemSkuInfo.SalesPrice;
                        rd.MinPrice          = kJItemSkuInfo.price;
                        rd.MinBasePrice      = kJItemSkuInfo.BasePrice;
                        rd.EventSKUMappingId = kJItemSkuInfo.EventSKUMappingId;

                        double EventTime = Convert.ToInt64(eventItemInfo.EventEndTime.Subtract(DateTime.Now).TotalSeconds < 0 ? 0 : eventItemInfo.EventEndTime.Subtract(DateTime.Now).TotalSeconds);
                        double tempTime  = (kJItemSkuInfo.CreateTime.AddHours(Convert.ToDouble(eventItemInfo.BargaingingInterval)) - DateTime.Now).TotalSeconds;
                        if (EventTime > tempTime)
                        {
                            rd.Seconds = Convert.ToInt64(tempTime < 0 ? 0 : tempTime);
                        }
                        else
                        {
                            rd.Seconds = Convert.ToInt64(EventTime < 0 ? 0 : EventTime);
                        }


                        decimal tempPrice = rd.MinPrice - rd.MinBasePrice;
                        if (tempPrice != 0)
                        {
                            rd.BargainedRate = Math.Round(rd.BargainedPrice / (tempPrice), 2);
                        }
                        else
                        {
                            rd.BargainedRate = 0;
                        }

                        if (!string.IsNullOrEmpty(rp.KJEventJoinId))
                        {
                            var panicbuyingKJEventJoinDetailEntity = panicbuyingKJEventJoinDetailBll.QueryByEntity(new PanicbuyingKJEventJoinDetailEntity()
                            {
                                KJEventJoinId = new Guid(rp.KJEventJoinId), VipId = pRequest.UserID
                            }, null).FirstOrDefault();
                            if (panicbuyingKJEventJoinDetailEntity == null)
                            {
                                rd.status = 2;
                            }
                            else
                            {
                                rd.status = 3;
                            }
                        }
                        else
                        {
                            rd.status = 2;
                        }
                    }
                }
                #endregion

                rd.DeliveryDesc      = customerBasicSettingBll.GetSettingValueByCode("DeliveryStrategy");
                rd.CustomerShortName = customerBasicSettingBll.GetSettingValueByCode("CustomerShortName");
                rd.WebLogo           = customerBasicSettingBll.GetSettingValueByCode("WebLogo");
                rd.QRCodeURL         = customerBasicSettingBll.GetSettingValueByCode("GuideQRCode");
            }
            else
            {
                throw new APIException("此活动已不存在")
                      {
                          ErrorCode = 100
                      };
            }
            return(rd);
        }
Esempio n. 7
0
        protected override JoinInKJEventRD ProcessRequest(APIRequest <JoinInKJEventRP> pRequest)
        {
            JoinInKJEventRP rp = pRequest.Parameters;
            JoinInKJEventRD rd = new JoinInKJEventRD();

            PanicbuyingKJEventJoinBLL        panicbuyingKJEventJoinBll        = new PanicbuyingKJEventJoinBLL(CurrentUserInfo);
            PanicbuyingEventBLL              panicbuyingEventBll              = new PanicbuyingEventBLL(CurrentUserInfo);
            PanicbuyingKJEventItemMappingBLL panicbuyingKJEventItemMappingBll = new PanicbuyingKJEventItemMappingBLL(CurrentUserInfo);

            if (string.IsNullOrEmpty(rp.EventId))
            {
                throw new APIException("EventId不能为空");
            }
            if (string.IsNullOrEmpty(rp.SkuId))
            {
                throw new APIException("SkuId不能为空");
            }

            #region  价参与
            PanicbuyingKJEventJoinEntity panicbuyingKJEventJoinEntity = new PanicbuyingKJEventJoinEntity()
            {
                KJEventJoinId = Guid.NewGuid(),
                EventId       = new Guid(rp.EventId),
                ItemId        = rp.ItemId,
                SkuId         = rp.SkuId,
                VipId         = pRequest.UserID,
                CustomerId    = pRequest.CustomerID,
                SalesPrice    = rp.Price,
            };
            panicbuyingKJEventJoinBll.Create(panicbuyingKJEventJoinEntity);
            #endregion

            #region 更新参与砍价活动人数统计
            var panicbuyingEventEnetity = panicbuyingEventBll.QueryByEntity(new PanicbuyingEventEntity()
            {
                EventId = new Guid(rp.EventId)
            }, null).FirstOrDefault();
            if (panicbuyingEventEnetity != null)
            {
                panicbuyingEventEnetity.PromotePersonCount += 1;
                //panicbuyingEventEnetity.BargainPersonCount += 1;
                panicbuyingEventBll.Update(panicbuyingEventEnetity);
            }
            #endregion

            #region 更新发起砍价商品活动人数统计
            var panicbuyingKJEventItemMappingEntity = panicbuyingKJEventItemMappingBll.QueryByEntity(new PanicbuyingKJEventItemMappingEntity()
            {
                EventId = new Guid(rp.EventId), ItemID = rp.ItemId
            }, null).FirstOrDefault();
            if (panicbuyingKJEventItemMappingEntity != null)
            {
                panicbuyingKJEventItemMappingEntity.PromotePersonCount += 1;
                panicbuyingKJEventItemMappingBll.Update(panicbuyingKJEventItemMappingEntity);
            }
            #endregion


            rd.KJEventJoinId = panicbuyingKJEventJoinEntity.KJEventJoinId.ToString();
            return(rd);
        }