Beispiel #1
0
 public int AddPopup(PopupMsgPlan pop, string type)
 {
     if (type == "add")
     {
         pop.PopupType = 1;
         pop.DataType  = "广告弹窗";
         if (pop.Content == "" || pop.Content == null)
         {
             pop.PopupType = 0;
         }
         pop.Status      = 0;
         pop.CreatedTime = DateTime.Now;
         pop.Editor      = UserCookies.AdminName;
         //不设置开始时间,默认当前时间
         if (pop.BeginTime == null)
         {
             pop.BeginTime = DateTime.Now;
         }
         //不设置时效的情况下,默认时效为30分钟
         if (pop.EndTime == null)
         {
             pop.EndTime = Convert.ToDateTime(pop.BeginTime).AddMinutes(30);
         }
         int res = opupMsgPlanBll.Add(pop);
         SsoServer.SsoPush(res, "0");
         return(res);
     }
     return(0);
 }
Beispiel #2
0
 public string CancelPlan(int PlanId)
 {
     PopupMsgPlan        = popupMsgPlanBLL.Get("PlanId", PlanId);
     PopupMsgPlan.Status = 3;
     if (SsoServer.UpDateStatus(PlanId, 0) == 0)
     {
         if (popupMsgPlanBLL.UpdateReceiveMsg(PlanId))
         {
             popupMsgPlanBLL.Update(PopupMsgPlan).ToString();
         }
         return("000000");
     }
     return("000001");
 }
Beispiel #3
0
        public int AddPopupzx(PopupMsgPlan pop, string type, int NewsId)
        {
            News        news        = newsBLL.Get("NewsId", NewsId);
            NewsContent newsContent = newsContentBLL.Get("NewsId", NewsId);

            pop.Title   = news.Title;
            pop.ImgUrl  = news.ImgUrl;
            pop.PageUrl = "id=" + news.NewsId;
            pop.NewsId  = news.NewsId;
            pop.Content = string.IsNullOrEmpty(news.NewsAbstract) ? (newsContent.Content.Length > 90 ? StringHelper.NoHTML(newsContent.Content.Substring(0, 90).Trim()) : newsContent.Content) : (news.NewsAbstract.Length > 90 ? news.NewsAbstract.Substring(0, 90).Trim() : news.NewsAbstract.Trim());

            if (type == "add")
            {
                pop.PopupType = 1;
                //if (pop.Content == "" || pop.Content == null)
                //    pop.PopupType = 0;
                pop.Status      = 0;
                pop.CreatedTime = DateTime.Now;
                pop.Editor      = UserCookies.AdminName;

                //不设置开始时间,默认当前时间
                if (pop.BeginTime == null)
                {
                    pop.BeginTime = DateTime.Now;
                }
                //不设置时效的情况下,默认时效为30分钟
                if (pop.EndTime == null)
                {
                    pop.EndTime = Convert.ToDateTime(pop.BeginTime).AddMinutes(30);
                }
                int res = opupMsgPlanBll.Add(pop);
                if (res > 0)
                {
                    NewsPopup np = new NewsPopup();
                    np.NewsId      = NewsId;
                    np.Title       = news.Title;
                    np.Author      = news.Author;
                    np.CreatedTime = news.CreatedTime;
                    np.PushColumn  = pop.PushColumn;
                    newsPopupBll.Add(np);
                }

                SsoServer.SsoPush(res, pop.PushVersion);
                return(res);
            }
            return(0);
        }
        public string SosPush(string id, string userId, string stockCode, string stockName, string quantity, string price, string operateUserName, string operateUserImg, string operateType, string operateTime, int staticTag)
        {
            if (string.IsNullOrEmpty(userId) || string.IsNullOrEmpty(stockCode) || string.IsNullOrEmpty(stockName) || string.IsNullOrEmpty(price) || string.IsNullOrEmpty(operateType) || string.IsNullOrEmpty(operateTime))
            {
                return("缺少参数");
            }
            StockContestData scd = new StockContestData();

            scd.Id              = "ds" + Guid.NewGuid().ToString();
            scd.UserId          = userId;
            scd.StockCode       = stockCode;
            scd.StockName       = stockName;
            scd.Quantity        = quantity;
            scd.Price           = price;
            scd.OperateUserName = operateUserName;
            scd.OperateUserImg  = operateUserImg;
            scd.OperateType     = operateType;
            scd.OperateTime     = operateTime;
            scd.StaticTag       = staticTag == 1 ? "4" : "3"; //来源数据: 0为模拟盘, 1为实盘; 手机推送表为3 跟 4

            SsoServer.SsoPush(scd);
            return("1");
        }
Beispiel #5
0
 public void ReSsoPush(int Id)
 {
     SsoServer.SsoPushOne(Id);
 }