/// <summary>
    /// 同步商品购买记录
    /// </summary>
    /// <param name="buf"></param>
    public void OnShopBuyRecord(KProtoBuf buf)
    {
        GetShopProxy().ClearBuyRecord();
        S2C_SYNC_SPECIAL_BUY_RECORD msg = (S2C_SYNC_SPECIAL_BUY_RECORD)buf;

        for (int i = 0; i < msg.goods_buy_list.Count; i++)
        {
            GoodsBuyInfo buyInfo = msg.goods_buy_list[i];
            GetShopProxy().AddBuyRecord(buyInfo.oid, buyInfo.num);
        }
        GameFacade.Instance.SendNotification(NotificationName.MSG_SHOP_CHANGE);
    }
 private ActionResult PublishGoods(BuyViewGoods goods, List <HttpPostedFileBase> facefile, List <HttpPostedFileBase> otherfile, List <HttpPostedFileBase> badfile)
 {
     if (BuildGoods(goods, facefile, otherfile, badfile))
     {
         GoodsBuyInfo transfergoods = MapperGoods(goods);
         buyService.SaveBuyGoods(transfergoods);
         RunJob();
         FxCacheService.FxSite.GlobalCache cache = System.Web.Mvc.DependencyResolver.Current.GetService <FxCacheService.FxSite.GlobalCache>();
         cache.InfoPublishAllCountAdd();
         return(View("Success"));
     }
     return(View("FaildTransfer"));
 }
        private GoodsBuyInfo MapperGoods(BuyViewGoods goods)
        {
            var info = new GoodsBuyInfo();

            info.CatagroyId        = goods.CatagroyId;
            info.AreaId            = goods.AreaId;
            info.ChangeMsg         = goods.ChangeGoodsMsg;
            info.Controller        = this.ControllerName;
            info.Action            = this.ActionName;
            info.CityId            = goods.CityId;
            info.GoodsConditionMsg = goods.GoodConditonMsg;
            info.GoodsconditonId   = goods.GoodConditionId;
            info.IsChange          = goods.IsChangeGoods;
            info.Mark = goods.Mark;
            goods.FaceFiles.ForEach(r => info.Pictures.Add(r));
            goods.OtherFiles.ForEach(r => info.Pictures.Add(r));
            goods.BadFiles.ForEach(r => info.Pictures.Add(r));
            info.Price            = (int)goods.Price;
            info.PublishTitle     = goods.Title;
            info.PublishUserEmail = goods.Email;
            info.UserAccount      = User.Identity.Name;
            return(info);
        }