From a7c531aa353dae5b40b3c47f37211666ed0250a6 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期一, 25 二月 2019 15:11:17 +0800
Subject: [PATCH] 3335 物品相关类型重构

---
 System/SystemSetting/ActivitiesPushModel.cs |  638 +++++++++++++++++++++++++++++-----------------------------
 1 files changed, 319 insertions(+), 319 deletions(-)

diff --git a/System/SystemSetting/ActivitiesPushMgr.cs b/System/SystemSetting/ActivitiesPushModel.cs
similarity index 92%
rename from System/SystemSetting/ActivitiesPushMgr.cs
rename to System/SystemSetting/ActivitiesPushModel.cs
index fc38988..f98083b 100644
--- a/System/SystemSetting/ActivitiesPushMgr.cs
+++ b/System/SystemSetting/ActivitiesPushModel.cs
@@ -1,319 +1,319 @@
-锘縰sing LitJson;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-
-namespace Snxxz.UI
-{
-   [XLua.LuaCallCSharp]
-	 public class ActivitiesPushMgr : Model,IBeforePlayerDataInitialize,IAfterPlayerDataInitialize,IPlayerLoginOk
-    {
-        public const int WholePeopleRankStart = 2091000; //鍏ㄦ皯鍐叉寮�濮�
-        public const int WholePeopleRankEnd = 20910000; //鍏ㄦ皯鍐叉鎴
-        public const int FlashRushToBuy = 209014; //闄愭椂鎶㈣喘
-        ImpactRankModel impactRank { get { return ModelCenter.Instance.GetModel<ImpactRankModel>(); } }
-        FlashRushToBuyModel rushToBuyModel { get { return ModelCenter.Instance.GetModel<FlashRushToBuyModel>(); } }
-
-        private List<int> rankTypelist = new List<int>();
-
-        public override void Init()
-        {
-            List<OSCBillRankAwardConfig> configs = OSCBillRankAwardConfig.GetValues();
-            for(int i = 0; i < configs.Count; i++)
-            {
-                if(!rankTypelist.Contains(configs[i].RangListType))
-                {
-                    rankTypelist.Add(configs[i].RangListType);
-                }
-            }
-        }
-
-        public void OnBeforePlayerDataInitialize()
-        {
-            rushToBuyModel.UpdateAllAppointmentEvent -= UpdateAllAppointment;
-            rushToBuyModel.UpdateAppointmentEvent -= UpdateAppointment;
-            GlobalTimeEvent.Instance.minuteEvent -= RefreshMinuteTime;
-            OpenServerActivityCenter.Instance.openServerActivityStateChange -= RefreshOpenServerState;
-        }
-
-        public void OnAfterPlayerDataInitialize()
-        {
-            
-        }
-
-        public void OnPlayerLoginOk()
-        {
-            SetRankStartPushInfo();
-            SetRankEndPushInfo();
-            SetFlashRushToBuyAppointmentInfo();
-            GlobalTimeEvent.Instance.minuteEvent += RefreshMinuteTime;
-            OpenServerActivityCenter.Instance.openServerActivityStateChange += RefreshOpenServerState;
-            rushToBuyModel.UpdateAllAppointmentEvent += UpdateAllAppointment;
-            rushToBuyModel.UpdateAppointmentEvent += UpdateAppointment;
-        }
-
-        public override void UnInit()
-        {
-          
-        }
-
-
-        private void RefreshMinuteTime()
-        {
-            RemovePushByTime(PushInfoType.RankStart,11);
-            RemovePushByTime(PushInfoType.RankEnd,23);
-            RemoveFlashRushToBuyAppointmentByTime();
-        }
-
-        private void RefreshOpenServerState()
-        {
-            SetRankStartPushInfo();
-            SetRankEndPushInfo();
-            RemovePushByActiveClose(PushInfoType.RankStart);
-            RemovePushByActiveClose(PushInfoType.RankEnd);
-            SetFlashRushToBuyAppointmentInfo();
-        }
-
-        #region 寮�鏈嶆椿鍔ㄥ啿姒滄帹閫�
-        private void SetRankStartPushInfo()
-        {
-            for(int i = 0; i <rankTypelist.Count; i++)
-            {
-                int rankStartId = WholePeopleRankStart + rankTypelist[i];
-                if (impactRank.IsActivityClose(rankTypelist[i]))
-                {
-                    RemovePushInfo(rankStartId);
-                }
-                else
-                {
-                    int day = impactRank.GetOpenDay(rankTypelist[i]);
-                    int remainHour = 11 - TimeUtility.ServerNow.Hour;
-                    int remainMinute = 0 - TimeUtility.ServerNow.Minute;
-                    int remainSecond = day * 24 * 60 * 60 + remainHour * 60 * 60 + remainMinute * 60;
-                    if (remainSecond > 0)
-                    {
-                        PlayerRankData.RankType rankType = impactRank.GetRankType(rankTypelist[i]);
-                        string rankName = StringUtility.Contact("OSCBillRankTitle_", rankType);
-                        SendPushInfo(GetPushJsonData(rankStartId, remainSecond, Language.Get("SetUpPrivate106"), Language.Get("SetUpPrivate107",Language.Get(rankName))));
-                    }
-                }
-            }
-        }
-
-        private void SetRankEndPushInfo()
-        {
-            for(int i = 0; i < rankTypelist.Count; i++)
-            {
-                int rankEndId = WholePeopleRankEnd + rankTypelist[i];
-                if (impactRank.IsActivityClose(rankTypelist[i]))
-                {
-                    RemovePushInfo(rankEndId);
-                }
-                else
-                {
-                    int day = impactRank.GetSurplusDay(rankTypelist[i]);
-                    int remainHour = 23 - TimeUtility.ServerNow.Hour;
-                    int remainMinute = 0 - TimeUtility.ServerNow.Minute;
-                    int remainSecond = (day - 1) * 24 * 60 * 60 + remainHour * 60 * 60 + remainMinute * 60;
-                    if (remainSecond > 0)
-                    {
-                        PlayerRankData.RankType rankType = impactRank.GetRankType(rankTypelist[i]);
-                        string rankName = StringUtility.Contact("OSCBillRankTitle_", rankType);
-                        SendPushInfo(GetPushJsonData(rankEndId, remainSecond, Language.Get("SetUpPrivate106"), Language.Get("SetUpPrivate108", Language.Get(rankName))));
-                    }
-                }
-            }
-        }
-
-        private void RemovePushByActiveClose(PushInfoType type)
-        {
-            switch (type)
-            {
-                case PushInfoType.RankStart:
-                    for (int i = 0; i < rankTypelist.Count; i++)
-                    {
-                        int rankStartId = WholePeopleRankStart + rankTypelist[i];
-                        if (impactRank.IsActivityClose(rankTypelist[i]))
-                        {
-                            RemovePushInfo(rankStartId);
-                        }
-                    }
-                    break;
-                case PushInfoType.RankEnd:
-                    for (int i = 0; i < rankTypelist.Count; i++)
-                    {
-                        int rankEndId = WholePeopleRankEnd + rankTypelist[i];
-                        if (impactRank.IsActivityClose(rankTypelist[i]))
-                        {
-                            RemovePushInfo(rankEndId);
-                        }
-                    }
-                    break;
-            }
-        }
-
-        private void RemovePushByTime(PushInfoType type, int time)
-        {
-            int remainHour = time - TimeUtility.ServerNow.Hour;
-            int remainMinute = 0 - TimeUtility.ServerNow.Minute;
-            int remainSecond = remainHour * 60 * 60 + remainMinute * 60;
-            switch (type)
-            {
-                case PushInfoType.RankStart:
-                    for (int i = 0; i < rankTypelist.Count; i++)
-                    {
-                        int rankStartId = WholePeopleRankStart + rankTypelist[i];
-                        if (!impactRank.IsActivityClose(rankTypelist[i]))
-                        {
-                            int day = impactRank.GetOpenDay(rankTypelist[i]);
-                            if (day <= 0 && remainSecond <= 120)
-                            {
-                                RemovePushInfo(rankStartId);
-                            }
-                        }
-                    }
-                    break;
-                case PushInfoType.RankEnd:
-                    for (int i = 0; i < rankTypelist.Count; i++)
-                    {
-                        int rankEndId = WholePeopleRankEnd + rankTypelist[i];
-                        if (!impactRank.IsActivityClose(rankTypelist[i]))
-                        {
-                            int day = impactRank.GetSurplusDay(rankTypelist[i]);
-                            if (day <= 1 && remainSecond <= 120)
-                            {
-                                RemovePushInfo(rankEndId);
-                            }
-                        }
-                    }
-                    break;
-            }
-        }
-        #endregion
-
-        #region 闄愭椂鎶㈣喘鎺ㄩ��
-        private void UpdateAllAppointment()
-        {
-            SetFlashRushToBuyAppointmentInfo();
-        }
-
-        private void UpdateAppointment(int shopGuid)
-        {
-            if (!rushToBuyModel.IsOpen) return;
-
-            var operation = rushToBuyModel.GetOperationFlashRushToBuy();
-            int pushId = FlashRushToBuy * 10 + shopGuid;
-            OperationFlashRushToBuy.FlashSaleItem saleItem;
-            OperationFlashRushToBuy.FlashSaleShop saleShop;
-            bool isSaleItem = operation.TryGetFlashItem(shopGuid,out saleShop,out saleItem);
-            if(isSaleItem)
-            {
-                if(saleItem.isAppointment != 1)
-                {
-                    RemovePushInfo(pushId);
-                }
-                else
-                {
-                    int seconds = 0;
-                    int buyState = operation.GetBuyTimeState(TimeUtility.ServerNow, saleShop.dayIndex, saleShop.timeIndex, out seconds);
-                    if(seconds > 800)
-                    {
-                        int remainSecond = seconds - 600;
-                        SendPushInfo(GetPushJsonData(pushId, remainSecond, "闄愭椂鎶㈣喘", "浜茬埍鐨勯亾鍙嬶紝鎮ㄩ绾︾殑闄愭椂鎶㈣喘鍟嗗搧鍗冲皢寮�鎶紝璇峰敖蹇繘鍏ユ父鎴忕鏉�锛�"));
-                    }
-                }
-            }
-        }
-
-        private void SetFlashRushToBuyAppointmentInfo()
-        {
-            if (!rushToBuyModel.IsOpen) return;
-
-            var operation = rushToBuyModel.GetOperationFlashRushToBuy();
-            for(int i = 0; i < operation.flashShops.Count; i++)
-            {
-                var flashShop = operation.flashShops[i];
-                int seconds = 0;
-                int buyState = operation.GetBuyTimeState(TimeUtility.ServerNow, flashShop.dayIndex,flashShop.timeIndex,out seconds);
-                var saleItems = operation.flashShops[i].items;
-                for (int j = 0; j < saleItems.Length; j++)
-                {
-                    int pushId = FlashRushToBuy * 10 + saleItems[j].shopGuid;
-                    if (buyState == -1 && seconds > 800 && saleItems[j].isAppointment == 1)
-                    {
-                        int remainSecond = seconds - 600;
-                        SendPushInfo(GetPushJsonData(pushId, remainSecond, "闄愭椂鎶㈣喘", "浜茬埍鐨勯亾鍙嬶紝鎮ㄩ绾︾殑闄愭椂鎶㈣喘鍟嗗搧鍗冲皢寮�鎶紝璇峰敖蹇繘鍏ユ父鎴忕鏉�锛�"));
-                    }
-                    else
-                    {
-                        RemovePushInfo(pushId);
-                    }
-                }
-            }
-        }
-
-        private void RemoveFlashRushToBuyAppointmentByTime()
-        {
-            if (!rushToBuyModel.IsOpen) return;
-
-            var operation = rushToBuyModel.GetOperationFlashRushToBuy();
-            for (int i = 0; i < operation.flashShops.Count; i++)
-            {
-                var flashShop = operation.flashShops[i];
-                int seconds = 0;
-                int buyState = operation.GetBuyTimeState(TimeUtility.ServerNow, flashShop.dayIndex, flashShop.timeIndex, out seconds);
-                var saleItems = operation.flashShops[i].items;
-                for (int j = 0; j < saleItems.Length; j++)
-                {
-                    int pushId = FlashRushToBuy * 10 + saleItems[j].shopGuid;
-                    if (buyState != -1)
-                    {
-                        RemovePushInfo(pushId);
-                    }
-                    else
-                    {
-                        if(seconds <= 180)
-                        {
-                            RemovePushInfo(pushId);
-                        }
-                    }
-                }
-            }
-        }
-        #endregion
-        public void RemovePushInfo(int pushId)
-        {
-            SDKUtility.Instance.GeTui_RemoveLocalMessage(pushId.ToString());
-        }
-
-        public void SendPushInfo(JsonData data)
-        {
-            SDKUtility.Instance.GeTui_SendLocalMessage(data);
-        }
-
-        public JsonData GetPushJsonData(int pushId,int pushtime,string title,string content)
-        {
-            JsonData _params = new JsonData();
-            _params["code"] = 2005;
-            _params["id"] = pushId;// id 閲嶈, 鏍囩ず姣忎釜閫氱煡鐨勬洿鏂版垨鑰呯Щ闄�
-            _params["title"] = title;// 鎺ㄩ�佹爣棰�
-            _params["subtitle"] = "";// 鍓爣棰�
-            _params["content"] = content;// 鍏蜂綋鍐呭
-            _params["badge"] = -1;// 瑙掓爣
-
-            // 浠ヤ笅涓哄喅瀹氬簲璇ュ涔呭悗寮瑰嚭姝ら�氱煡
-            System.TimeSpan ts = System.DateTime.UtcNow - new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
-            long ret = System.Convert.ToInt64(ts.TotalSeconds) + pushtime;// 琛ㄧず3绉掑悗
-            _params["fireTime"] = ret;
-            return _params;
-        }
-
-        public enum PushInfoType
-        {
-            RankStart,
-            RankEnd,
-        }
-    }
-}
+锘縰sing LitJson;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+
+namespace Snxxz.UI
+{
+    [XLua.LuaCallCSharp]
+    public class ActivitiesPushModel : Model, IBeforePlayerDataInitialize, IAfterPlayerDataInitialize, IPlayerLoginOk
+    {
+        public const int WholePeopleRankStart = 2091000; //鍏ㄦ皯鍐叉寮�濮�
+        public const int WholePeopleRankEnd = 20910000; //鍏ㄦ皯鍐叉鎴
+        public const int FlashRushToBuy = 209014; //闄愭椂鎶㈣喘
+        ImpactRankModel impactRank { get { return ModelCenter.Instance.GetModel<ImpactRankModel>(); } }
+        FlashRushToBuyModel rushToBuyModel { get { return ModelCenter.Instance.GetModel<FlashRushToBuyModel>(); } }
+
+        private List<int> rankTypelist = new List<int>();
+
+        public override void Init()
+        {
+            List<OSCBillRankAwardConfig> configs = OSCBillRankAwardConfig.GetValues();
+            for (int i = 0; i < configs.Count; i++)
+            {
+                if (!rankTypelist.Contains(configs[i].RangListType))
+                {
+                    rankTypelist.Add(configs[i].RangListType);
+                }
+            }
+        }
+
+        public void OnBeforePlayerDataInitialize()
+        {
+            rushToBuyModel.UpdateAllAppointmentEvent -= UpdateAllAppointment;
+            rushToBuyModel.UpdateAppointmentEvent -= UpdateAppointment;
+            GlobalTimeEvent.Instance.minuteEvent -= RefreshMinuteTime;
+            OpenServerActivityCenter.Instance.openServerActivityStateChange -= RefreshOpenServerState;
+        }
+
+        public void OnAfterPlayerDataInitialize()
+        {
+
+        }
+
+        public void OnPlayerLoginOk()
+        {
+            SetRankStartPushInfo();
+            SetRankEndPushInfo();
+            SetFlashRushToBuyAppointmentInfo();
+            GlobalTimeEvent.Instance.minuteEvent += RefreshMinuteTime;
+            OpenServerActivityCenter.Instance.openServerActivityStateChange += RefreshOpenServerState;
+            rushToBuyModel.UpdateAllAppointmentEvent += UpdateAllAppointment;
+            rushToBuyModel.UpdateAppointmentEvent += UpdateAppointment;
+        }
+
+        public override void UnInit()
+        {
+
+        }
+
+
+        private void RefreshMinuteTime()
+        {
+            RemovePushByTime(PushInfoType.RankStart, 11);
+            RemovePushByTime(PushInfoType.RankEnd, 23);
+            RemoveFlashRushToBuyAppointmentByTime();
+        }
+
+        private void RefreshOpenServerState()
+        {
+            SetRankStartPushInfo();
+            SetRankEndPushInfo();
+            RemovePushByActiveClose(PushInfoType.RankStart);
+            RemovePushByActiveClose(PushInfoType.RankEnd);
+            SetFlashRushToBuyAppointmentInfo();
+        }
+
+        #region 寮�鏈嶆椿鍔ㄥ啿姒滄帹閫�
+        private void SetRankStartPushInfo()
+        {
+            for (int i = 0; i < rankTypelist.Count; i++)
+            {
+                int rankStartId = WholePeopleRankStart + rankTypelist[i];
+                if (impactRank.IsActivityClose(rankTypelist[i]))
+                {
+                    RemovePushInfo(rankStartId);
+                }
+                else
+                {
+                    int day = impactRank.GetOpenDay(rankTypelist[i]);
+                    int remainHour = 11 - TimeUtility.ServerNow.Hour;
+                    int remainMinute = 0 - TimeUtility.ServerNow.Minute;
+                    int remainSecond = day * 24 * 60 * 60 + remainHour * 60 * 60 + remainMinute * 60;
+                    if (remainSecond > 0)
+                    {
+                        PlayerRankData.RankType rankType = impactRank.GetRankType(rankTypelist[i]);
+                        string rankName = StringUtility.Contact("OSCBillRankTitle_", rankType);
+                        SendPushInfo(GetPushJsonData(rankStartId, remainSecond, Language.Get("SetUpPrivate106"), Language.Get("SetUpPrivate107", Language.Get(rankName))));
+                    }
+                }
+            }
+        }
+
+        private void SetRankEndPushInfo()
+        {
+            for (int i = 0; i < rankTypelist.Count; i++)
+            {
+                int rankEndId = WholePeopleRankEnd + rankTypelist[i];
+                if (impactRank.IsActivityClose(rankTypelist[i]))
+                {
+                    RemovePushInfo(rankEndId);
+                }
+                else
+                {
+                    int day = impactRank.GetSurplusDay(rankTypelist[i]);
+                    int remainHour = 23 - TimeUtility.ServerNow.Hour;
+                    int remainMinute = 0 - TimeUtility.ServerNow.Minute;
+                    int remainSecond = (day - 1) * 24 * 60 * 60 + remainHour * 60 * 60 + remainMinute * 60;
+                    if (remainSecond > 0)
+                    {
+                        PlayerRankData.RankType rankType = impactRank.GetRankType(rankTypelist[i]);
+                        string rankName = StringUtility.Contact("OSCBillRankTitle_", rankType);
+                        SendPushInfo(GetPushJsonData(rankEndId, remainSecond, Language.Get("SetUpPrivate106"), Language.Get("SetUpPrivate108", Language.Get(rankName))));
+                    }
+                }
+            }
+        }
+
+        private void RemovePushByActiveClose(PushInfoType type)
+        {
+            switch (type)
+            {
+                case PushInfoType.RankStart:
+                    for (int i = 0; i < rankTypelist.Count; i++)
+                    {
+                        int rankStartId = WholePeopleRankStart + rankTypelist[i];
+                        if (impactRank.IsActivityClose(rankTypelist[i]))
+                        {
+                            RemovePushInfo(rankStartId);
+                        }
+                    }
+                    break;
+                case PushInfoType.RankEnd:
+                    for (int i = 0; i < rankTypelist.Count; i++)
+                    {
+                        int rankEndId = WholePeopleRankEnd + rankTypelist[i];
+                        if (impactRank.IsActivityClose(rankTypelist[i]))
+                        {
+                            RemovePushInfo(rankEndId);
+                        }
+                    }
+                    break;
+            }
+        }
+
+        private void RemovePushByTime(PushInfoType type, int time)
+        {
+            int remainHour = time - TimeUtility.ServerNow.Hour;
+            int remainMinute = 0 - TimeUtility.ServerNow.Minute;
+            int remainSecond = remainHour * 60 * 60 + remainMinute * 60;
+            switch (type)
+            {
+                case PushInfoType.RankStart:
+                    for (int i = 0; i < rankTypelist.Count; i++)
+                    {
+                        int rankStartId = WholePeopleRankStart + rankTypelist[i];
+                        if (!impactRank.IsActivityClose(rankTypelist[i]))
+                        {
+                            int day = impactRank.GetOpenDay(rankTypelist[i]);
+                            if (day <= 0 && remainSecond <= 120)
+                            {
+                                RemovePushInfo(rankStartId);
+                            }
+                        }
+                    }
+                    break;
+                case PushInfoType.RankEnd:
+                    for (int i = 0; i < rankTypelist.Count; i++)
+                    {
+                        int rankEndId = WholePeopleRankEnd + rankTypelist[i];
+                        if (!impactRank.IsActivityClose(rankTypelist[i]))
+                        {
+                            int day = impactRank.GetSurplusDay(rankTypelist[i]);
+                            if (day <= 1 && remainSecond <= 120)
+                            {
+                                RemovePushInfo(rankEndId);
+                            }
+                        }
+                    }
+                    break;
+            }
+        }
+        #endregion
+
+        #region 闄愭椂鎶㈣喘鎺ㄩ��
+        private void UpdateAllAppointment()
+        {
+            SetFlashRushToBuyAppointmentInfo();
+        }
+
+        private void UpdateAppointment(int shopGuid)
+        {
+            if (!rushToBuyModel.IsOpen) return;
+
+            var operation = rushToBuyModel.GetOperationFlashRushToBuy();
+            int pushId = FlashRushToBuy * 10 + shopGuid;
+            OperationFlashRushToBuy.FlashSaleItem saleItem;
+            OperationFlashRushToBuy.FlashSaleShop saleShop;
+            bool isSaleItem = operation.TryGetFlashItem(shopGuid, out saleShop, out saleItem);
+            if (isSaleItem)
+            {
+                if (saleItem.isAppointment != 1)
+                {
+                    RemovePushInfo(pushId);
+                }
+                else
+                {
+                    int seconds = 0;
+                    int buyState = operation.GetBuyTimeState(TimeUtility.ServerNow, saleShop.dayIndex, saleShop.timeIndex, out seconds);
+                    if (seconds > 800)
+                    {
+                        int remainSecond = seconds - 600;
+                        SendPushInfo(GetPushJsonData(pushId, remainSecond, "闄愭椂鎶㈣喘", "浜茬埍鐨勯亾鍙嬶紝鎮ㄩ绾︾殑闄愭椂鎶㈣喘鍟嗗搧鍗冲皢寮�鎶紝璇峰敖蹇繘鍏ユ父鎴忕鏉�锛�"));
+                    }
+                }
+            }
+        }
+
+        private void SetFlashRushToBuyAppointmentInfo()
+        {
+            if (!rushToBuyModel.IsOpen) return;
+
+            var operation = rushToBuyModel.GetOperationFlashRushToBuy();
+            for (int i = 0; i < operation.flashShops.Count; i++)
+            {
+                var flashShop = operation.flashShops[i];
+                int seconds = 0;
+                int buyState = operation.GetBuyTimeState(TimeUtility.ServerNow, flashShop.dayIndex, flashShop.timeIndex, out seconds);
+                var saleItems = operation.flashShops[i].items;
+                for (int j = 0; j < saleItems.Length; j++)
+                {
+                    int pushId = FlashRushToBuy * 10 + saleItems[j].shopGuid;
+                    if (buyState == -1 && seconds > 800 && saleItems[j].isAppointment == 1)
+                    {
+                        int remainSecond = seconds - 600;
+                        SendPushInfo(GetPushJsonData(pushId, remainSecond, "闄愭椂鎶㈣喘", "浜茬埍鐨勯亾鍙嬶紝鎮ㄩ绾︾殑闄愭椂鎶㈣喘鍟嗗搧鍗冲皢寮�鎶紝璇峰敖蹇繘鍏ユ父鎴忕鏉�锛�"));
+                    }
+                    else
+                    {
+                        RemovePushInfo(pushId);
+                    }
+                }
+            }
+        }
+
+        private void RemoveFlashRushToBuyAppointmentByTime()
+        {
+            if (!rushToBuyModel.IsOpen) return;
+
+            var operation = rushToBuyModel.GetOperationFlashRushToBuy();
+            for (int i = 0; i < operation.flashShops.Count; i++)
+            {
+                var flashShop = operation.flashShops[i];
+                int seconds = 0;
+                int buyState = operation.GetBuyTimeState(TimeUtility.ServerNow, flashShop.dayIndex, flashShop.timeIndex, out seconds);
+                var saleItems = operation.flashShops[i].items;
+                for (int j = 0; j < saleItems.Length; j++)
+                {
+                    int pushId = FlashRushToBuy * 10 + saleItems[j].shopGuid;
+                    if (buyState != -1)
+                    {
+                        RemovePushInfo(pushId);
+                    }
+                    else
+                    {
+                        if (seconds <= 180)
+                        {
+                            RemovePushInfo(pushId);
+                        }
+                    }
+                }
+            }
+        }
+        #endregion
+        public void RemovePushInfo(int pushId)
+        {
+            SDKUtility.Instance.GeTui_RemoveLocalMessage(pushId.ToString());
+        }
+
+        public void SendPushInfo(JsonData data)
+        {
+            SDKUtility.Instance.GeTui_SendLocalMessage(data);
+        }
+
+        public JsonData GetPushJsonData(int pushId, int pushtime, string title, string content)
+        {
+            JsonData _params = new JsonData();
+            _params["code"] = 2005;
+            _params["id"] = pushId;// id 閲嶈, 鏍囩ず姣忎釜閫氱煡鐨勬洿鏂版垨鑰呯Щ闄�
+            _params["title"] = title;// 鎺ㄩ�佹爣棰�
+            _params["subtitle"] = "";// 鍓爣棰�
+            _params["content"] = content;// 鍏蜂綋鍐呭
+            _params["badge"] = -1;// 瑙掓爣
+
+            // 浠ヤ笅涓哄喅瀹氬簲璇ュ涔呭悗寮瑰嚭姝ら�氱煡
+            System.TimeSpan ts = System.DateTime.UtcNow - new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
+            long ret = System.Convert.ToInt64(ts.TotalSeconds) + pushtime;// 琛ㄧず3绉掑悗
+            _params["fireTime"] = ret;
+            return _params;
+        }
+
+        public enum PushInfoType
+        {
+            RankStart,
+            RankEnd,
+        }
+    }
+}

--
Gitblit v1.8.0