Procházet zdrojové kódy

增加统计归档交易额队列

lichunlei před 1 rokem
rodič
revize
e84849be8f

+ 569 - 0
AppStart/Helper/Stat2Service.cs

@@ -0,0 +1,569 @@
+using System;
+using System.Collections.Generic;
+using Library;
+using LitJson;
+using System.Linq;
+using System.Data;
+using System.Threading;
+using MySystem.PxcModels;
+
+namespace MySystem
+{
+    public class Stat2Service
+    {
+        public readonly static Stat2Service Instance = new Stat2Service();
+        private Stat2Service()
+        { }
+
+
+
+
+
+
+        // 统计交易额V2
+        public void Start()
+        {
+            Thread th = new Thread(StartDo);
+            th.IsBackground = true;
+            th.Start();
+        }
+        public void StartDo()
+        {
+            while (true)
+            {
+                if(RedisDbconn.Instance.Get<string>("StatServerStatus") == "1" && DateTime.Now.Hour >= 3)
+                {
+                    StatTrade();
+                }
+                Thread.Sleep(30000);
+            }
+        }
+
+        public void StatTrade(int Id = 0)
+        {
+            function.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"), "实时统计归档交易额日志");
+            WebCMSEntities db = new WebCMSEntities();
+            using (var tran = db.Database.BeginTransaction())
+            {
+                try
+                {
+                    string startId = function.ReadInstance("/TradeRecord/Id2.txt");
+                    if(string.IsNullOrEmpty(startId))
+                    {
+                        startId = "19613145";
+                    }
+                    string sql = "select Id from TradeRecord where Id>=" + startId + " and DirectFlag=0 and ActStatus=1 and BrandId!=14 order by Id limit 50";
+                    if(Id > 0)
+                    {
+                        sql = "select Id from TradeRecord where Id=" + Id;
+                    }
+                    DataTable idsDt = CustomerSqlConn.dtable(sql, AppConfig.Base.SqlConn);
+                    if(idsDt.Rows.Count > 0)
+                    {
+                        string ids = "";
+                        foreach (DataRow idsDr in idsDt.Rows)
+                        {
+                            ids += idsDr["Id"].ToString() + ",";
+                            if(Id == 0)
+                            {
+                                startId = idsDr["Id"].ToString();
+                            }
+                        }
+                        DataTable selfDt = CustomerSqlConn.dtable("select UserId,ParentNav,BrandId,BankCardType,QrPayFlag,MerHelpFlag,Version,CapFlag,VipFlag,PayType,DATE_FORMAT(CreateDate,'%Y%m%d'),sum(TradeAmount),count(Id),SnNo from TradeRecord where Id in (" + ids.TrimEnd(',') + ") group by UserId,ParentNav,BrandId,BankCardType,QrPayFlag,MerHelpFlag,Version,CapFlag,VipFlag,PayType,DATE_FORMAT(CreateDate,'%Y%m%d'),SnNo", AppConfig.Base.SqlConn);
+                        if (selfDt.Rows.Count > 0)
+                        {
+                            function.WriteLog("统计人数:" + selfDt.Rows.Count + "\n\n", "实时统计归档交易额日志");
+                            foreach (DataRow selfDr in selfDt.Rows)
+                            {
+                                int UserId = int.Parse(selfDr["UserId"].ToString());
+                                string SnNo = selfDr["SnNo"].ToString();                                
+                                PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == SnNo) ?? new PosMachinesTwo();
+                                if(UserId == 0)
+                                {
+                                    UserId = pos.UserId;
+                                }                                
+                                Users user = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
+                                string ParentNav = user.ParentNav; //selfDr["ParentNav"].ToString();
+                                StatBefore(db, selfDr, UserId, ParentNav);
+                                StatAfter(db, selfDr, UserId, ParentNav);
+                            }
+                            CustomerSqlConn.op("update TradeRecord set DirectFlag=1 where Id in (" + ids.TrimEnd(',') + ")", AppConfig.Base.SqlConn);
+                            if(Id == 0)
+                            {
+                                function.WritePage("/TradeRecord/", "Id2.txt", startId);
+                            }
+                        }
+                        db.SaveChanges();
+                    }
+                    tran.Commit();
+                }
+                catch (Exception ex)
+                {
+                    tran.Rollback();
+                    function.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString(), "实时统计归档交易额异常");
+                }
+            }
+            db.Dispose();
+            function.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + "\n\n", "实时统计归档交易额日志");
+        }
+
+        public void StatBefore(WebCMSEntities db, DataRow selfDr, int UserId, string ParentNav)
+        {
+            int BrandId = int.Parse(selfDr["BrandId"].ToString());
+            int BankCardType = int.Parse(selfDr["BankCardType"].ToString());
+            int QrPayFlag = int.Parse(selfDr["QrPayFlag"].ToString());
+            int MerHelpFlag = int.Parse(selfDr["MerHelpFlag"].ToString());
+            int Version = int.Parse(selfDr["Version"].ToString());
+            int CapFlag = int.Parse(selfDr["CapFlag"].ToString());
+            int VipFlag = int.Parse(selfDr["VipFlag"].ToString());
+            int PayType = int.Parse(selfDr["PayType"].ToString());
+            string TradeDate = selfDr[10].ToString();
+            decimal TradeAmount = decimal.Parse(selfDr[11].ToString());
+            int TradeCount = int.Parse(selfDr[12].ToString());
+            string TradeMonth = TradeDate.Substring(0, 6);
+
+            TradeDaySummaryBefore selfStat = db.TradeDaySummaryBefore.FirstOrDefault(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.BrandId == BrandId && m.QueryCount == QrPayFlag && m.VipFlag == VipFlag && m.PayType == PayType && m.SeoTitle == "self");
+            if (selfStat == null)
+            {
+                selfStat = db.TradeDaySummaryBefore.Add(new TradeDaySummaryBefore()
+                {
+                    UserId = UserId,
+                    TradeMonth = TradeMonth,
+                    TradeDate = TradeDate,
+                    BrandId = BrandId,
+                    QueryCount = QrPayFlag,
+                    VipFlag = VipFlag,
+                    PayType = PayType,
+                    SeoTitle = "self",
+                }).Entity;
+                db.SaveChanges();
+            }
+            if (BankCardType == 0)
+            {
+                if (Version == 1)
+                {
+                    selfStat.ProfitDirectDebitTradeAmt += TradeAmount;
+                    if (CapFlag == 1)
+                    {
+                        selfStat.ProfitDirectDebitCapTradeAmt += TradeAmount;
+                        selfStat.ProfitDirectDebitCapNum += TradeCount;
+                    }
+                }
+                else if (MerHelpFlag == 1)
+                {
+                    selfStat.HelpDirectDebitTradeAmt += TradeAmount;
+                    if (CapFlag == 1)
+                    {
+                        selfStat.HelpDirectDebitCapTradeAmt += TradeAmount;
+                        selfStat.HelpDirectDebitCapNum += TradeCount;
+                    }
+                }
+                else
+                {
+                    selfStat.NotHelpDirectDebitTradeAmt += TradeAmount;
+                    if (CapFlag == 1)
+                    {
+                        selfStat.NotHelpDirectDebitCapTradeAmt += TradeAmount;
+                        selfStat.NotHelpDirectDebitCapNum += TradeCount;
+                    }
+                }
+            }
+            else if (BankCardType != 0)
+            {
+                if (Version == 1)
+                {
+                    selfStat.ProfitDirectTradeAmt += TradeAmount;
+                }
+                else if (MerHelpFlag == 1)
+                {
+                    selfStat.HelpDirectTradeAmt += TradeAmount;
+                }
+                else
+                {
+                    selfStat.NotHelpDirectTradeAmt += TradeAmount;
+                }
+            }
+            ParentNav += "," + UserId + ",";
+            if (!string.IsNullOrEmpty(ParentNav))
+            {
+                string[] ParentNavList = ParentNav.Trim(',').Replace(",,", ",").Split(',');
+                foreach (string NavUserIdString in ParentNavList)
+                {
+                    int NavUserId = int.Parse(NavUserIdString);
+                    TradeDaySummaryBefore teamStat = db.TradeDaySummaryBefore.FirstOrDefault(m => m.UserId == NavUserId && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.BrandId == BrandId && m.QueryCount == QrPayFlag && m.VipFlag == VipFlag && m.PayType == PayType && m.SeoTitle == "team");
+                    if (teamStat == null)
+                    {
+                        teamStat = db.TradeDaySummaryBefore.Add(new TradeDaySummaryBefore()
+                        {
+                            UserId = NavUserId,
+                            TradeMonth = TradeMonth,
+                            TradeDate = TradeDate,
+                            BrandId = BrandId,
+                            QueryCount = QrPayFlag,
+                            VipFlag = VipFlag,
+                            PayType = PayType,
+                            SeoTitle = "team",
+                        }).Entity;
+                        db.SaveChanges();
+                    }
+                    if (BankCardType == 0)
+                    {
+                        if (Version == 1)
+                        {
+                            teamStat.ProfitNonDirectDebitTradeAmt += TradeAmount;
+                            if (CapFlag == 1)
+                            {
+                                teamStat.ProfitDirectDebitCapTradeAmt += TradeAmount;
+                                teamStat.ProfitDirectDebitCapNum += TradeCount;
+                            }
+                        }
+                        else if (MerHelpFlag == 1)
+                        {
+                            teamStat.HelpNonDirectDebitTradeAmt += TradeAmount;
+                            if (CapFlag == 1)
+                            {
+                                teamStat.HelpDirectDebitCapTradeAmt += TradeAmount;
+                                teamStat.HelpDirectDebitCapNum += TradeCount;
+                            }
+                        }
+                        else
+                        {
+                            teamStat.NotHelpNonDirectDebitTradeAmt += TradeAmount;
+                            if (CapFlag == 1)
+                            {
+                                teamStat.NotHelpDirectDebitCapTradeAmt += TradeAmount;
+                                teamStat.NotHelpDirectDebitCapNum += TradeCount;
+                            }
+                        }
+                    }
+                    else if (BankCardType != 0)
+                    {
+                        if (Version == 1)
+                        {
+                            teamStat.ProfitNonDirectTradeAmt += TradeAmount;
+                        }
+                        else if (MerHelpFlag == 1)
+                        {
+                            teamStat.HelpNonDirectTradeAmt += TradeAmount;
+                        }
+                        else
+                        {
+                            teamStat.NotHelpNonDirectTradeAmt += TradeAmount;
+                        }
+                    }
+                }
+            }
+
+
+            //盈利期,费率0.6
+            TradeDaySummary2Before selfStat2 = db.TradeDaySummary2Before.FirstOrDefault(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.BrandId == BrandId && m.QueryCount == QrPayFlag && m.VipFlag == VipFlag && m.PayType == PayType && m.SeoTitle == "self");
+            if (selfStat2 == null)
+            {
+                selfStat2 = db.TradeDaySummary2Before.Add(new TradeDaySummary2Before()
+                {
+                    UserId = UserId,
+                    TradeMonth = TradeMonth,
+                    TradeDate = TradeDate,
+                    BrandId = BrandId,
+                    QueryCount = QrPayFlag,
+                    VipFlag = VipFlag,
+                    PayType = PayType,
+                    SeoTitle = "self",
+                }).Entity;
+                db.SaveChanges();
+            }
+            if (BankCardType == 0)
+            {
+                if (Version == 2)
+                {
+                    selfStat2.ProfitDebitTradeAmt += TradeAmount;
+                    if (CapFlag == 1)
+                    {
+                        selfStat2.ProfitDebitCapTradeAmt += TradeAmount;
+                        selfStat2.ProfitDebitCapNum += TradeCount;
+                    }
+                }
+            }
+            else if (BankCardType != 0)
+            {
+                if (Version == 2)
+                {
+                    selfStat2.ProfitTradeAmt += TradeAmount;
+                }
+            }
+            if (!string.IsNullOrEmpty(ParentNav))
+            {
+                string[] ParentNavList = ParentNav.Trim(',').Replace(",,", ",").Split(',');
+                foreach (string NavUserIdString in ParentNavList)
+                {
+                    int NavUserId = int.Parse(NavUserIdString);
+                    TradeDaySummary2Before teamStat2 = db.TradeDaySummary2Before.FirstOrDefault(m => m.UserId == NavUserId && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.BrandId == BrandId && m.QueryCount == QrPayFlag && m.VipFlag == VipFlag && m.PayType == PayType && m.SeoTitle == "team");
+                    if (teamStat2 == null)
+                    {
+                        teamStat2 = db.TradeDaySummary2Before.Add(new TradeDaySummary2Before()
+                        {
+                            UserId = NavUserId,
+                            TradeMonth = TradeMonth,
+                            TradeDate = TradeDate,
+                            BrandId = BrandId,
+                            QueryCount = QrPayFlag,
+                            VipFlag = VipFlag,
+                            PayType = PayType,
+                            SeoTitle = "team",
+                        }).Entity;
+                        db.SaveChanges();
+                    }
+                    if (BankCardType == 0)
+                    {
+                        if (Version == 2)
+                        {
+                            teamStat2.ProfitDebitTradeAmt += TradeAmount;
+                            if (CapFlag == 1)
+                            {
+                                teamStat2.ProfitDebitCapTradeAmt += TradeAmount;
+                                teamStat2.ProfitDebitCapNum += TradeCount;
+                            }
+                        }
+                    }
+                    else if (BankCardType != 0)
+                    {
+                        if (Version == 2)
+                        {
+                            teamStat2.ProfitTradeAmt += TradeAmount;
+                        }
+                    }
+                }
+            }
+        }
+
+        public void StatAfter(WebCMSEntities db, DataRow selfDr, int UserId, string ParentNav)
+        {
+            int BrandId = int.Parse(selfDr["BrandId"].ToString());
+            int BankCardType = int.Parse(selfDr["BankCardType"].ToString());
+            int QrPayFlag = int.Parse(selfDr["QrPayFlag"].ToString());
+            int MerHelpFlag = int.Parse(selfDr["MerHelpFlag"].ToString());
+            int Version = int.Parse(selfDr["Version"].ToString());
+            int CapFlag = int.Parse(selfDr["CapFlag"].ToString());
+            int VipFlag = int.Parse(selfDr["VipFlag"].ToString());
+            int PayType = int.Parse(selfDr["PayType"].ToString());
+            string TradeDate = selfDr[10].ToString();
+            decimal TradeAmount = decimal.Parse(selfDr[11].ToString());
+            int TradeCount = int.Parse(selfDr[12].ToString());
+            string TradeMonth = TradeDate.Substring(0, 6);
+
+            TradeDaySummaryAfter selfStat = db.TradeDaySummaryAfter.FirstOrDefault(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.BrandId == BrandId && m.QueryCount == QrPayFlag && m.VipFlag == VipFlag && m.PayType == PayType && m.SeoTitle == "self");
+            if (selfStat == null)
+            {
+                selfStat = db.TradeDaySummaryAfter.Add(new TradeDaySummaryAfter()
+                {
+                    UserId = UserId,
+                    TradeMonth = TradeMonth,
+                    TradeDate = TradeDate,
+                    BrandId = BrandId,
+                    QueryCount = QrPayFlag,
+                    VipFlag = VipFlag,
+                    PayType = PayType,
+                    SeoTitle = "self",
+                }).Entity;
+                db.SaveChanges();
+            }
+            if (BankCardType == 0)
+            {
+                if (Version == 1)
+                {
+                    selfStat.ProfitDirectDebitTradeAmt += TradeAmount;
+                    if (CapFlag == 1)
+                    {
+                        selfStat.ProfitDirectDebitCapTradeAmt += TradeAmount;
+                        selfStat.ProfitDirectDebitCapNum += TradeCount;
+                    }
+                }
+                else if (MerHelpFlag == 1)
+                {
+                    selfStat.HelpDirectDebitTradeAmt += TradeAmount;
+                    if (CapFlag == 1)
+                    {
+                        selfStat.HelpDirectDebitCapTradeAmt += TradeAmount;
+                        selfStat.HelpDirectDebitCapNum += TradeCount;
+                    }
+                }
+                else
+                {
+                    selfStat.NotHelpDirectDebitTradeAmt += TradeAmount;
+                    if (CapFlag == 1)
+                    {
+                        selfStat.NotHelpDirectDebitCapTradeAmt += TradeAmount;
+                        selfStat.NotHelpDirectDebitCapNum += TradeCount;
+                    }
+                }
+            }
+            else if (BankCardType != 0)
+            {
+                if (Version == 1)
+                {
+                    selfStat.ProfitDirectTradeAmt += TradeAmount;
+                }
+                else if (MerHelpFlag == 1)
+                {
+                    selfStat.HelpDirectTradeAmt += TradeAmount;
+                }
+                else
+                {
+                    selfStat.NotHelpDirectTradeAmt += TradeAmount;
+                }
+            }
+            ParentNav += "," + UserId + ",";
+            if (!string.IsNullOrEmpty(ParentNav))
+            {
+                string[] ParentNavList = ParentNav.Trim(',').Replace(",,", ",").Split(',');
+                foreach (string NavUserIdString in ParentNavList)
+                {
+                    int NavUserId = int.Parse(NavUserIdString);
+                    TradeDaySummaryAfter teamStat = db.TradeDaySummaryAfter.FirstOrDefault(m => m.UserId == NavUserId && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.BrandId == BrandId && m.QueryCount == QrPayFlag && m.VipFlag == VipFlag && m.PayType == PayType && m.SeoTitle == "team");
+                    if (teamStat == null)
+                    {
+                        teamStat = db.TradeDaySummaryAfter.Add(new TradeDaySummaryAfter()
+                        {
+                            UserId = NavUserId,
+                            TradeMonth = TradeMonth,
+                            TradeDate = TradeDate,
+                            BrandId = BrandId,
+                            QueryCount = QrPayFlag,
+                            VipFlag = VipFlag,
+                            PayType = PayType,
+                            SeoTitle = "team",
+                        }).Entity;
+                        db.SaveChanges();
+                    }
+                    if (BankCardType == 0)
+                    {
+                        if (Version == 1)
+                        {
+                            teamStat.ProfitNonDirectDebitTradeAmt += TradeAmount;
+                            if (CapFlag == 1)
+                            {
+                                teamStat.ProfitDirectDebitCapTradeAmt += TradeAmount;
+                                teamStat.ProfitDirectDebitCapNum += TradeCount;
+                            }
+                        }
+                        else if (MerHelpFlag == 1)
+                        {
+                            teamStat.HelpNonDirectDebitTradeAmt += TradeAmount;
+                            if (CapFlag == 1)
+                            {
+                                teamStat.HelpDirectDebitCapTradeAmt += TradeAmount;
+                                teamStat.HelpDirectDebitCapNum += TradeCount;
+                            }
+                        }
+                        else
+                        {
+                            teamStat.NotHelpNonDirectDebitTradeAmt += TradeAmount;
+                            if (CapFlag == 1)
+                            {
+                                teamStat.NotHelpDirectDebitCapTradeAmt += TradeAmount;
+                                teamStat.NotHelpDirectDebitCapNum += TradeCount;
+                            }
+                        }
+                    }
+                    else if (BankCardType != 0)
+                    {
+                        if (Version == 1)
+                        {
+                            teamStat.ProfitNonDirectTradeAmt += TradeAmount;
+                        }
+                        else if (MerHelpFlag == 1)
+                        {
+                            teamStat.HelpNonDirectTradeAmt += TradeAmount;
+                        }
+                        else
+                        {
+                            teamStat.NotHelpNonDirectTradeAmt += TradeAmount;
+                        }
+                    }
+                }
+            }
+
+
+            //盈利期,费率0.6
+            TradeDaySummary2After selfStat2 = db.TradeDaySummary2After.FirstOrDefault(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.BrandId == BrandId && m.QueryCount == QrPayFlag && m.VipFlag == VipFlag && m.PayType == PayType && m.SeoTitle == "self");
+            if (selfStat2 == null)
+            {
+                selfStat2 = db.TradeDaySummary2After.Add(new TradeDaySummary2After()
+                {
+                    UserId = UserId,
+                    TradeMonth = TradeMonth,
+                    TradeDate = TradeDate,
+                    BrandId = BrandId,
+                    QueryCount = QrPayFlag,
+                    VipFlag = VipFlag,
+                    PayType = PayType,
+                    SeoTitle = "self",
+                }).Entity;
+                db.SaveChanges();
+            }
+            if (BankCardType == 0)
+            {
+                if (Version == 2)
+                {
+                    selfStat2.ProfitDebitTradeAmt += TradeAmount;
+                    if (CapFlag == 1)
+                    {
+                        selfStat2.ProfitDebitCapTradeAmt += TradeAmount;
+                        selfStat2.ProfitDebitCapNum += TradeCount;
+                    }
+                }
+            }
+            else if (BankCardType != 0)
+            {
+                if (Version == 2)
+                {
+                    selfStat2.ProfitTradeAmt += TradeAmount;
+                }
+            }
+            if (!string.IsNullOrEmpty(ParentNav))
+            {
+                string[] ParentNavList = ParentNav.Trim(',').Replace(",,", ",").Split(',');
+                foreach (string NavUserIdString in ParentNavList)
+                {
+                    int NavUserId = int.Parse(NavUserIdString);
+                    TradeDaySummary2After teamStat2 = db.TradeDaySummary2After.FirstOrDefault(m => m.UserId == NavUserId && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.BrandId == BrandId && m.QueryCount == QrPayFlag && m.VipFlag == VipFlag && m.PayType == PayType && m.SeoTitle == "team");
+                    if (teamStat2 == null)
+                    {
+                        teamStat2 = db.TradeDaySummary2After.Add(new TradeDaySummary2After()
+                        {
+                            UserId = NavUserId,
+                            TradeMonth = TradeMonth,
+                            TradeDate = TradeDate,
+                            BrandId = BrandId,
+                            QueryCount = QrPayFlag,
+                            VipFlag = VipFlag,
+                            PayType = PayType,
+                            SeoTitle = "team",
+                        }).Entity;
+                        db.SaveChanges();
+                    }
+                    if (BankCardType == 0)
+                    {
+                        if (Version == 2)
+                        {
+                            teamStat2.ProfitDebitTradeAmt += TradeAmount;
+                            if (CapFlag == 1)
+                            {
+                                teamStat2.ProfitDebitCapTradeAmt += TradeAmount;
+                                teamStat2.ProfitDebitCapNum += TradeCount;
+                            }
+                        }
+                    }
+                    else if (BankCardType != 0)
+                    {
+                        if (Version == 2)
+                        {
+                            teamStat2.ProfitTradeAmt += TradeAmount;
+                        }
+                    }
+                }
+            }
+        }
+
+    }
+}

+ 23 - 0
PxcModels/LeaderRankWhite.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class LeaderRankWhite
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int Rank { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 1 - 0
PxcModels/MachineChangeDetail.cs

@@ -30,5 +30,6 @@ namespace MySystem.PxcModels
         public int BackProductType { get; set; }
         public int ChangeId { get; set; }
         public string ChangeNo { get; set; }
+        public ulong NoticeFlag { get; set; }
     }
 }

+ 1 - 0
PxcModels/MachineUnBind.cs

@@ -22,5 +22,6 @@ namespace MySystem.PxcModels
         public int BrandId { get; set; }
         public int UserId { get; set; }
         public string ApplyNo { get; set; }
+        public ulong NoticeFlag { get; set; }
     }
 }

+ 28 - 0
PxcModels/MerchantDepositRecord.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class MerchantDepositRecord
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public ulong NoticeFlag { get; set; }
+        public string OrderId { get; set; }
+        public int UserId { get; set; }
+        public decimal DepositAmount { get; set; }
+        public string MerNo { get; set; }
+        public string SnNo { get; set; }
+        public string AgentNo { get; set; }
+    }
+}

+ 23 - 0
PxcModels/OperatorRankWhite.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class OperatorRankWhite
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int Rank { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 2 - 0
PxcModels/PosMachinesTwo.cs

@@ -66,5 +66,7 @@ namespace MySystem.PxcModels
         public int LastMerchantId { get; set; }
         public int CardType { get; set; }
         public decimal DownFee { get; set; }
+        public int FirstFlag { get; set; }
+        public int IsExecute { get; set; }
     }
 }

+ 1 - 0
PxcModels/PosMerchantInfo.cs

@@ -45,5 +45,6 @@ namespace MySystem.PxcModels
         public string MerchantNo { get; set; }
         public int StandardMonths { get; set; }
         public int StandardStatus { get; set; }
+        public ulong NoticeFlag { get; set; }
     }
 }

+ 2 - 0
PxcModels/ProfitRewardExport.cs

@@ -37,5 +37,7 @@ namespace MySystem.PxcModels
         public string MakerCode { get; set; }
         public decimal ProfitCreditTradeProfit { get; set; }
         public decimal ProfitCreditTradeAmt { get; set; }
+        public decimal ProfitCreditTradeProfit2 { get; set; }
+        public decimal ProfitCreditTradeAmt2 { get; set; }
     }
 }

+ 3 - 0
PxcModels/ProfitRewardRecord.cs

@@ -79,5 +79,8 @@ namespace MySystem.PxcModels
         public decimal ProfitCreditTradeProfit { get; set; }
         public decimal ProfitDebitNonCapTradeAmt { get; set; }
         public decimal ProfitCreditTradeAmt { get; set; }
+        public decimal ProfitCreditTradeAmt2 { get; set; }
+        public decimal ProfitCreditProfitRate2 { get; set; }
+        public decimal ProfitCreditTradeProfit2 { get; set; }
     }
 }

+ 1 - 0
PxcModels/ToChargeBackRecord.cs

@@ -22,5 +22,6 @@ namespace MySystem.PxcModels
         public decimal TotalAmount { get; set; }
         public int TimeNumber { get; set; }
         public DateTime? StartDate { get; set; }
+        public int Kind { get; set; }
     }
 }

+ 1 - 0
PxcModels/ToChargeBackRecordSub.cs

@@ -19,5 +19,6 @@ namespace MySystem.PxcModels
         public string Remark { get; set; }
         public decimal ChargeAmount { get; set; }
         public int ParentId { get; set; }
+        public int Kind { get; set; }
     }
 }

+ 1 - 0
PxcModels/ToChargeByStage.cs

@@ -20,5 +20,6 @@ namespace MySystem.PxcModels
         public string Remark { get; set; }
         public decimal ChargeAmount { get; set; }
         public int UserId { get; set; }
+        public int Kind { get; set; }
     }
 }

+ 32 - 0
PxcModels/TradeDaySummary2After.cs

@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class TradeDaySummary2After
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public decimal ProfitDebitCapNum { get; set; }
+        public decimal ProfitDebitCapTradeAmt { get; set; }
+        public decimal ProfitDebitTradeAmt { get; set; }
+        public decimal ProfitTradeAmt { get; set; }
+        public int PayType { get; set; }
+        public int VipFlag { get; set; }
+        public int TopUserId { get; set; }
+        public int BrandId { get; set; }
+        public string TradeMonth { get; set; }
+        public string TradeDate { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 32 - 0
PxcModels/TradeDaySummary2Before.cs

@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class TradeDaySummary2Before
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public decimal ProfitDebitCapNum { get; set; }
+        public decimal ProfitDebitCapTradeAmt { get; set; }
+        public decimal ProfitDebitTradeAmt { get; set; }
+        public decimal ProfitTradeAmt { get; set; }
+        public int PayType { get; set; }
+        public int VipFlag { get; set; }
+        public int TopUserId { get; set; }
+        public int BrandId { get; set; }
+        public string TradeMonth { get; set; }
+        public string TradeDate { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 84 - 0
PxcModels/TradeDaySummaryAfter.cs

@@ -0,0 +1,84 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class TradeDaySummaryAfter
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int TopUserId { get; set; }
+        public decimal HelpNonDirectNonQrDebitTradeAmt { get; set; }
+        public decimal HelpDirectNonQrDebitTradeAmt { get; set; }
+        public decimal HelpNonDirectQrDebitTradeAmt { get; set; }
+        public decimal HelpDirectQrDebitTradeAmt { get; set; }
+        public decimal HelpNonDirectDebitCapNum { get; set; }
+        public decimal HelpNonDirectDebitCapTradeAmt { get; set; }
+        public decimal HelpNonDirectDebitTradeAmt { get; set; }
+        public decimal HelpDirectDebitCapNum { get; set; }
+        public decimal HelpDirectDebitCapTradeAmt { get; set; }
+        public decimal HelpDirectDebitTradeAmt { get; set; }
+        public decimal HelpNonDirectNonQrCreditTradeAmt { get; set; }
+        public decimal HelpDirectNonQrCreditTradeAmt { get; set; }
+        public decimal HelpNonDirectQrCreditTradeAmt { get; set; }
+        public decimal HelpDirectQrCreditTradeAmt { get; set; }
+        public decimal HelpNonDirectCreditTradeAmt { get; set; }
+        public decimal HelpDirectCreditTradeAmt { get; set; }
+        public decimal HelpNonDirectTradeAmt { get; set; }
+        public decimal HelpDirectTradeAmt { get; set; }
+        public decimal NotHelpNonDirectNonQrDebitTradeAmt { get; set; }
+        public decimal NotHelpDirectNonQrDebitTradeAmt { get; set; }
+        public decimal NotHelpNonDirectQrDebitTradeAmt { get; set; }
+        public decimal NotHelpDirectQrDebitTradeAmt { get; set; }
+        public int NotHelpNonDirectDebitCapNum { get; set; }
+        public decimal NotHelpNonDirectDebitCapTradeAmt { get; set; }
+        public decimal NotHelpNonDirectDebitTradeAmt { get; set; }
+        public int NotHelpDirectDebitCapNum { get; set; }
+        public decimal NotHelpDirectDebitCapTradeAmt { get; set; }
+        public decimal NotHelpDirectDebitTradeAmt { get; set; }
+        public decimal NotHelpNonDirectNonQrCreditTradeAmt { get; set; }
+        public decimal NotHelpDirectNonQrCreditTradeAmt { get; set; }
+        public decimal NotHelpNonDirectQrCreditTradeAmt { get; set; }
+        public decimal NotHelpDirectQrCreditTradeAmt { get; set; }
+        public decimal NotHelpNonDirectCreditTradeAmt { get; set; }
+        public decimal NotHelpDirectCreditTradeAmt { get; set; }
+        public decimal NotHelpNonDirectTradeAmt { get; set; }
+        public decimal NotHelpDirectTradeAmt { get; set; }
+        public string MgrName { get; set; }
+        public string MgrNo { get; set; }
+        public int BrandId { get; set; }
+        public string TradeMonth { get; set; }
+        public string TradeDate { get; set; }
+        public int UserId { get; set; }
+        public int PayType { get; set; }
+        public int VipFlag { get; set; }
+        public decimal ProfitNonDirectNonQrDebitTradeAmt { get; set; }
+        public decimal ProfitDirectNonQrDebitTradeAmt { get; set; }
+        public decimal ProfitNonDirectQrDebitTradeAmt { get; set; }
+        public decimal ProfitDirectQrDebitTradeAmt { get; set; }
+        public decimal ProfitNonDirectDebitCapNum { get; set; }
+        public decimal ProfitNonDirectDebitCapTradeAmt { get; set; }
+        public decimal ProfitNonDirectDebitTradeAmt { get; set; }
+        public decimal ProfitDirectDebitCapNum { get; set; }
+        public decimal ProfitDirectDebitCapTradeAmt { get; set; }
+        public decimal ProfitDirectDebitTradeAmt { get; set; }
+        public decimal ProfitNonDirectNonQrCreditTradeAmt { get; set; }
+        public decimal ProfitDirectNonQrCreditTradeAmt { get; set; }
+        public decimal ProfitNonDirectQrCreditTradeAmt { get; set; }
+        public decimal ProfitDirectQrCreditTradeAmt { get; set; }
+        public decimal ProfitNonDirectCreditTradeAmt { get; set; }
+        public decimal ProfitDirectCreditTradeAmt { get; set; }
+        public decimal ProfitNonDirectTradeAmt { get; set; }
+        public decimal ProfitDirectTradeAmt { get; set; }
+    }
+}

+ 84 - 0
PxcModels/TradeDaySummaryBefore.cs

@@ -0,0 +1,84 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class TradeDaySummaryBefore
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int TopUserId { get; set; }
+        public decimal HelpNonDirectNonQrDebitTradeAmt { get; set; }
+        public decimal HelpDirectNonQrDebitTradeAmt { get; set; }
+        public decimal HelpNonDirectQrDebitTradeAmt { get; set; }
+        public decimal HelpDirectQrDebitTradeAmt { get; set; }
+        public decimal HelpNonDirectDebitCapNum { get; set; }
+        public decimal HelpNonDirectDebitCapTradeAmt { get; set; }
+        public decimal HelpNonDirectDebitTradeAmt { get; set; }
+        public decimal HelpDirectDebitCapNum { get; set; }
+        public decimal HelpDirectDebitCapTradeAmt { get; set; }
+        public decimal HelpDirectDebitTradeAmt { get; set; }
+        public decimal HelpNonDirectNonQrCreditTradeAmt { get; set; }
+        public decimal HelpDirectNonQrCreditTradeAmt { get; set; }
+        public decimal HelpNonDirectQrCreditTradeAmt { get; set; }
+        public decimal HelpDirectQrCreditTradeAmt { get; set; }
+        public decimal HelpNonDirectCreditTradeAmt { get; set; }
+        public decimal HelpDirectCreditTradeAmt { get; set; }
+        public decimal HelpNonDirectTradeAmt { get; set; }
+        public decimal HelpDirectTradeAmt { get; set; }
+        public decimal NotHelpNonDirectNonQrDebitTradeAmt { get; set; }
+        public decimal NotHelpDirectNonQrDebitTradeAmt { get; set; }
+        public decimal NotHelpNonDirectQrDebitTradeAmt { get; set; }
+        public decimal NotHelpDirectQrDebitTradeAmt { get; set; }
+        public int NotHelpNonDirectDebitCapNum { get; set; }
+        public decimal NotHelpNonDirectDebitCapTradeAmt { get; set; }
+        public decimal NotHelpNonDirectDebitTradeAmt { get; set; }
+        public int NotHelpDirectDebitCapNum { get; set; }
+        public decimal NotHelpDirectDebitCapTradeAmt { get; set; }
+        public decimal NotHelpDirectDebitTradeAmt { get; set; }
+        public decimal NotHelpNonDirectNonQrCreditTradeAmt { get; set; }
+        public decimal NotHelpDirectNonQrCreditTradeAmt { get; set; }
+        public decimal NotHelpNonDirectQrCreditTradeAmt { get; set; }
+        public decimal NotHelpDirectQrCreditTradeAmt { get; set; }
+        public decimal NotHelpNonDirectCreditTradeAmt { get; set; }
+        public decimal NotHelpDirectCreditTradeAmt { get; set; }
+        public decimal NotHelpNonDirectTradeAmt { get; set; }
+        public decimal NotHelpDirectTradeAmt { get; set; }
+        public string MgrName { get; set; }
+        public string MgrNo { get; set; }
+        public int BrandId { get; set; }
+        public string TradeMonth { get; set; }
+        public string TradeDate { get; set; }
+        public int UserId { get; set; }
+        public int PayType { get; set; }
+        public int VipFlag { get; set; }
+        public decimal ProfitNonDirectNonQrDebitTradeAmt { get; set; }
+        public decimal ProfitDirectNonQrDebitTradeAmt { get; set; }
+        public decimal ProfitNonDirectQrDebitTradeAmt { get; set; }
+        public decimal ProfitDirectQrDebitTradeAmt { get; set; }
+        public decimal ProfitNonDirectDebitCapNum { get; set; }
+        public decimal ProfitNonDirectDebitCapTradeAmt { get; set; }
+        public decimal ProfitNonDirectDebitTradeAmt { get; set; }
+        public decimal ProfitDirectDebitCapNum { get; set; }
+        public decimal ProfitDirectDebitCapTradeAmt { get; set; }
+        public decimal ProfitDirectDebitTradeAmt { get; set; }
+        public decimal ProfitNonDirectNonQrCreditTradeAmt { get; set; }
+        public decimal ProfitDirectNonQrCreditTradeAmt { get; set; }
+        public decimal ProfitNonDirectQrCreditTradeAmt { get; set; }
+        public decimal ProfitDirectQrCreditTradeAmt { get; set; }
+        public decimal ProfitNonDirectCreditTradeAmt { get; set; }
+        public decimal ProfitDirectCreditTradeAmt { get; set; }
+        public decimal ProfitNonDirectTradeAmt { get; set; }
+        public decimal ProfitDirectTradeAmt { get; set; }
+    }
+}

+ 1 - 0
PxcModels/TradeRecord.cs

@@ -41,5 +41,6 @@ namespace MySystem.PxcModels
         public int PayType { get; set; }
         public int VipFlag { get; set; }
         public int ActStatus { get; set; }
+        public int StatStatus { get; set; }
     }
 }

+ 2 - 0
PxcModels/UserAccount.cs

@@ -46,5 +46,7 @@ namespace MySystem.PxcModels
         public decimal PreTempAmountForBalance { get; set; }
         public decimal PreTempAmount { get; set; }
         public decimal ToChargeAmount { get; set; }
+        public decimal LeaderToChargeAmount { get; set; }
+        public decimal OperateToChargeAmount { get; set; }
     }
 }

+ 23 - 0
PxcModels/UserExchangeLeaderRecord.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class UserExchangeLeaderRecord
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int ExchangeType { get; set; }
+        public int UserId { get; set; }
+    }
+}

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 882 - 10
PxcModels/WebCMSEntities.cs


+ 1 - 0
Startup.cs

@@ -100,6 +100,7 @@ namespace MySystem
             
             //必须打开的
             StatService.Instance.StartEverDayV2(); //实时统计交易额
+            Stat2Service.Instance.Start(); //实时统计归档交易额
             StatService.Instance.StartOther(); //补充统计交易额
             StatService.Instance.StartPosActNum(); //实时统计激活数
             StatService.Instance.StartNewUserNum(); //实时统计新增创客数

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů