Просмотр исходного кода

统计新老政策是交易额

lcl 8 месяцев назад
Родитель
Сommit
9420e275cc
57 измененных файлов с 5837 добавлено и 3 удалено
  1. BIN
      AppStart/.DS_Store
  2. 354 0
      AppStart/Helper/StatGdNewService.cs
  3. 381 0
      AppStart/Helper/StatGdNewService2.cs
  4. 48 0
      KxsProductModels/KxsBrand.cs
  5. 17 0
      KxsProductModels/KxsBrandSort.cs
  6. 19 0
      KxsProductModels/KxsBrandType.cs
  7. 32 0
      KxsProductModels/KxsGdOrder.cs
  8. 28 0
      KxsProductModels/KxsGdReport.cs
  9. 53 0
      KxsProductModels/KxsMachine.cs
  10. 20 0
      KxsProductModels/KxsMachineAdvance.cs
  11. 24 0
      KxsProductModels/KxsMachineAdvanceInfo.cs
  12. 22 0
      KxsProductModels/KxsMachineAward.cs
  13. 22 0
      KxsProductModels/KxsMachineCashOrder.cs
  14. 20 0
      KxsProductModels/KxsMachineCirculationLog.cs
  15. 35 0
      KxsProductModels/KxsMachineCutBind.cs
  16. 17 0
      KxsProductModels/KxsMachineDeduct.cs
  17. 19 0
      KxsProductModels/KxsMachineExpInfo.cs
  18. 22 0
      KxsProductModels/KxsMachinePledge.cs
  19. 26 0
      KxsProductModels/KxsMachineRatio.cs
  20. 25 0
      KxsProductModels/KxsMachineTrack.cs
  21. 24 0
      KxsProductModels/KxsMachineTransfer.cs
  22. 21 0
      KxsProductModels/KxsMachineUnbind.cs
  23. 30 0
      KxsProductModels/KxsMerchant.cs
  24. 26 0
      KxsProductModels/KxsMerchantReturn.cs
  25. 25 0
      KxsProductModels/KxsMerchantTrade.cs
  26. 20 0
      KxsProductModels/KxsMerchantUser.cs
  27. 22 0
      KxsProductModels/KxsShopCate.cs
  28. 28 0
      KxsProductModels/KxsShopGoods.cs
  29. 17 0
      KxsProductModels/KxsShopGoodsPic.cs
  30. 22 0
      KxsProductModels/KxsShopGoodsSku.cs
  31. 18 0
      KxsProductModels/KxsShopGoodsSpec.cs
  32. 38 0
      KxsProductModels/KxsShopOrder.cs
  33. 22 0
      KxsProductModels/KxsShopOrderInfo.cs
  34. 22 0
      KxsProductModels/KxsTicket.cs
  35. 24 0
      KxsProductModels/KxsTicketTransfer.cs
  36. 17 0
      KxsProductModels/KxsTicketTransferInfo.cs
  37. 22 0
      KxsProductModels/KxsTicketUpgrade.cs
  38. 16 0
      KxsProductModels/UndoLog.cs
  39. 3240 0
      KxsProductModels/WebCMSEntities.cs
  40. 25 0
      PxcModels/UserAmountSummaryNewAfter.cs
  41. 25 0
      PxcModels/UserAmountSummaryNewBefore.cs
  42. 25 0
      PxcModels/UserAmountSummaryOldAfter.cs
  43. 25 0
      PxcModels/UserAmountSummaryOldBefore.cs
  44. 232 0
      PxcModels/WebCMSEntities.cs
  45. 22 0
      PxcModels2/HdDepositTmp.cs
  46. 20 0
      PxcModels2/HdOrderTmp.cs
  47. 12 0
      PxcModels2/HdQrCodeTmp.cs
  48. 3 0
      PxcModels2/MerchantAddInfo.cs
  49. 19 0
      PxcModels2/MerchantFeeRecord.cs
  50. 1 0
      PxcModels2/MerchantInfo.cs
  51. 25 0
      PxcModels2/UserAmountSummaryNewAfter.cs
  52. 25 0
      PxcModels2/UserAmountSummaryNewBefore.cs
  53. 25 0
      PxcModels2/UserAmountSummaryOldAfter.cs
  54. 25 0
      PxcModels2/UserAmountSummaryOldBefore.cs
  55. 487 3
      PxcModels2/WebCMSEntities.cs
  56. 2 0
      Startup.cs
  57. 1 0
      appsettings.Development.json

BIN
AppStart/.DS_Store


+ 354 - 0
AppStart/Helper/StatGdNewService.cs

@@ -0,0 +1,354 @@
+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 StatGdNewService
+    {
+        public readonly static StatGdNewService Instance = new StatGdNewService();
+        private StatGdNewService()
+        { }
+
+
+
+
+
+
+        // 统计交易额V2
+        public void Start()
+        {
+            Thread th = new Thread(StartDo);
+            th.IsBackground = true;
+            th.Start();
+        }
+        public void StartDo()
+        {
+            while (true)
+            {
+                if(DateTime.Now.Hour >= 3 && RedisDbconn.Instance.Get<string>("StatServerStatus") == "1")
+                {
+                    StatTradeAmount();
+                }
+                Thread.Sleep(1000);
+            }
+        }
+        public void StatTradeAmount()
+        {
+            string connstr = Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString();
+            function.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"), "统计创客归档交易日志");
+            PxcModels.WebCMSEntities db = new PxcModels.WebCMSEntities();
+            KxsMainModels.WebCMSEntities maindb = new KxsMainModels.WebCMSEntities();
+            using (var tran = db.Database.BeginTransaction())
+            {
+                try
+                {
+                    string start = "2024-10-01 00:00:00";
+                    DataTable idsDt = CustomerSqlConn.dtable("select Id from ConsumerOrders where Id>=333068 and CreateDate>='" + start + "' and Status>0 and Version=2 order by Id limit 50", connstr);
+                    if(idsDt.Rows.Count > 0)
+                    {
+                        string ids = "";
+                        foreach (DataRow idsDr in idsDt.Rows)
+                        {
+                            ids += idsDr["Id"].ToString() + ",";
+                        }
+                        DataTable selfDt = CustomerSqlConn.dtable("select UserId,MerchantId,SnNo,PayMode,IsAct,DATE_FORMAT(CreateDate,'%Y%m%d'),sum(PayMoney),count(Id),sum(MaxDivi),sum(MerchantActualAmount) from ConsumerOrders where Id in (" + ids.TrimEnd(',') + ") group by UserId,MerchantId,SnNo,PayMode,IsAct,DATE_FORMAT(CreateDate,'%Y%m%d')", connstr);
+                        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();
+                                DateTime BindTime = DateTime.Now;
+                                PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == SnNo) ?? new PosMachinesTwo();
+                                if (UserId == 0)
+                                {
+                                    UserId = pos.UserId;
+                                    BindTime = pos.BindingTime.Value;
+                                }
+                                KxsMainModels.Users user = maindb.Users.FirstOrDefault(m => m.Id == UserId) ?? new KxsMainModels.Users();
+                                string ParentNav = user.ParentNav; //selfDr["ParentNav"].ToString();
+                                if (BindTime < DateTime.Now.AddMonths(-9))
+                                {
+                                    if (BindTime < DateTime.Parse("2025-01-01 00:00:00"))
+                                    {
+                                        StatOldBefore(db, selfDr, UserId, ParentNav);
+                                    }
+                                    else
+                                    {
+                                        StatNewBefore(db, selfDr, UserId, ParentNav);
+                                    }
+                                }
+                                else
+                                {
+                                    if (BindTime < DateTime.Parse("2025-01-01 00:00:00"))
+                                    {
+                                        StatOldAfter(db, selfDr, UserId, ParentNav);
+                                    }
+                                    else
+                                    {
+                                        StatNewAfter(db, selfDr, UserId, ParentNav);
+                                    }
+                                }
+                            }
+                            CustomerSqlConn.op("update ConsumerOrders set Version=3 where Id in (" + ids.TrimEnd(',') + ")", connstr);
+                        }
+                    }
+                    tran.Commit();
+                }
+                catch (Exception ex)
+                {
+                    tran.Rollback();
+                    function.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString(), "统计创客归档交易日志异常");
+                }
+            }
+            db.Dispose();
+            maindb.Dispose();
+            function.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + "\n\n", "统计创客归档交易日志");
+        }
+
+        
+        public void StatNewBefore(PxcModels.WebCMSEntities db, DataRow selfDr, int UserId, string ParentNav)
+        {
+            int MerchantId = int.Parse(selfDr["MerchantId"].ToString());
+            int PayMode = int.Parse(selfDr["PayMode"].ToString());
+            int IsAct = int.Parse(selfDr["IsAct"].ToString());
+            string SnNo = selfDr["SnNo"].ToString();
+            string TradeDate = selfDr[5].ToString();
+            decimal TradeAmount = decimal.Parse(selfDr[6].ToString());
+            int TradeCount = int.Parse(selfDr[7].ToString());
+            decimal MaxDivi = decimal.Parse(selfDr[8].ToString());
+            decimal ActualAmount = decimal.Parse(selfDr[9].ToString());
+            string TradeMonth = TradeDate.Substring(0, 6);
+
+            //创客交易额
+            UserAmountSummaryNewBefore selfStat = db.UserAmountSummaryNewBefore.FirstOrDefault(m => m.UserId == UserId && m.IsAct == IsAct && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.PayMode == PayMode && m.SeoTitle == "self");
+            if (selfStat == null)
+            {
+                selfStat = db.UserAmountSummaryNewBefore.Add(new UserAmountSummaryNewBefore()
+                {
+                    UserId = UserId,
+                    TradeMonth = TradeMonth,
+                    TradeDate = TradeDate,
+                    PayMode = PayMode,
+                    IsAct = IsAct,
+                    SeoTitle = "self",
+                }).Entity;
+                db.SaveChanges();
+            }
+            selfStat.TotalAmount += TradeAmount;
+            selfStat.TradeCount += TradeCount;
+            ParentNav += "," + UserId + ",";
+            if (!string.IsNullOrEmpty(ParentNav))
+            {
+                string[] ParentNavList = ParentNav.Trim(',').Replace(",,", ",").Split(',');
+                foreach (string NavUserIdString in ParentNavList)
+                {
+                    int NavUserId = int.Parse(NavUserIdString);
+                    UserAmountSummaryNewBefore teamStat = db.UserAmountSummaryNewBefore.FirstOrDefault(m => m.UserId == NavUserId && m.IsAct == IsAct && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.PayMode == PayMode && m.SeoTitle == "team");
+                    if (teamStat == null)
+                    {
+                        teamStat = db.UserAmountSummaryNewBefore.Add(new UserAmountSummaryNewBefore()
+                        {
+                            UserId = NavUserId,
+                            TradeMonth = TradeMonth,
+                            TradeDate = TradeDate,
+                            PayMode = PayMode,
+                            IsAct = IsAct,
+                            SeoTitle = "team",
+                        }).Entity;
+                        db.SaveChanges();
+                    }
+                    teamStat.TotalAmount += TradeAmount;
+                    teamStat.TradeCount += TradeCount;
+                }
+            }
+            db.SaveChanges();
+        }
+
+        public void StatNewAfter(PxcModels.WebCMSEntities db, DataRow selfDr, int UserId, string ParentNav)
+        {
+            int MerchantId = int.Parse(selfDr["MerchantId"].ToString());
+            int PayMode = int.Parse(selfDr["PayMode"].ToString());
+            int IsAct = int.Parse(selfDr["IsAct"].ToString());
+            string SnNo = selfDr["SnNo"].ToString();
+            string TradeDate = selfDr[5].ToString();
+            decimal TradeAmount = decimal.Parse(selfDr[6].ToString());
+            int TradeCount = int.Parse(selfDr[7].ToString());
+            decimal MaxDivi = decimal.Parse(selfDr[8].ToString());
+            decimal ActualAmount = decimal.Parse(selfDr[9].ToString());
+            string TradeMonth = TradeDate.Substring(0, 6);
+
+            //创客交易额
+            UserAmountSummaryNewAfter selfStat = db.UserAmountSummaryNewAfter.FirstOrDefault(m => m.UserId == UserId && m.IsAct == IsAct && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.PayMode == PayMode && m.SeoTitle == "self");
+            if (selfStat == null)
+            {
+                selfStat = db.UserAmountSummaryNewAfter.Add(new UserAmountSummaryNewAfter()
+                {
+                    UserId = UserId,
+                    TradeMonth = TradeMonth,
+                    TradeDate = TradeDate,
+                    PayMode = PayMode,
+                    IsAct = IsAct,
+                    SeoTitle = "self",
+                }).Entity;
+                db.SaveChanges();
+            }
+            selfStat.TotalAmount += TradeAmount;
+            selfStat.TradeCount += TradeCount;
+            ParentNav += "," + UserId + ",";
+            if (!string.IsNullOrEmpty(ParentNav))
+            {
+                string[] ParentNavList = ParentNav.Trim(',').Replace(",,", ",").Split(',');
+                foreach (string NavUserIdString in ParentNavList)
+                {
+                    int NavUserId = int.Parse(NavUserIdString);
+                    UserAmountSummaryNewAfter teamStat = db.UserAmountSummaryNewAfter.FirstOrDefault(m => m.UserId == NavUserId && m.IsAct == IsAct && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.PayMode == PayMode && m.SeoTitle == "team");
+                    if (teamStat == null)
+                    {
+                        teamStat = db.UserAmountSummaryNewAfter.Add(new UserAmountSummaryNewAfter()
+                        {
+                            UserId = NavUserId,
+                            TradeMonth = TradeMonth,
+                            TradeDate = TradeDate,
+                            PayMode = PayMode,
+                            IsAct = IsAct,
+                            SeoTitle = "team",
+                        }).Entity;
+                        db.SaveChanges();
+                    }
+                    teamStat.TotalAmount += TradeAmount;
+                    teamStat.TradeCount += TradeCount;
+                }
+            }
+            db.SaveChanges();
+        }
+
+
+
+        public void StatOldBefore(PxcModels.WebCMSEntities db, DataRow selfDr, int UserId, string ParentNav)
+        {
+            int MerchantId = int.Parse(selfDr["MerchantId"].ToString());
+            int PayMode = int.Parse(selfDr["PayMode"].ToString());
+            int IsAct = int.Parse(selfDr["IsAct"].ToString());
+            string SnNo = selfDr["SnNo"].ToString();
+            string TradeDate = selfDr[5].ToString();
+            decimal TradeAmount = decimal.Parse(selfDr[6].ToString());
+            int TradeCount = int.Parse(selfDr[7].ToString());
+            decimal MaxDivi = decimal.Parse(selfDr[8].ToString());
+            decimal ActualAmount = decimal.Parse(selfDr[9].ToString());
+            string TradeMonth = TradeDate.Substring(0, 6);
+
+            //创客交易额
+            UserAmountSummaryOldBefore selfStat = db.UserAmountSummaryOldBefore.FirstOrDefault(m => m.UserId == UserId && m.IsAct == IsAct && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.PayMode == PayMode && m.SeoTitle == "self");
+            if (selfStat == null)
+            {
+                selfStat = db.UserAmountSummaryOldBefore.Add(new UserAmountSummaryOldBefore()
+                {
+                    UserId = UserId,
+                    TradeMonth = TradeMonth,
+                    TradeDate = TradeDate,
+                    PayMode = PayMode,
+                    IsAct = IsAct,
+                    SeoTitle = "self",
+                }).Entity;
+                db.SaveChanges();
+            }
+            selfStat.TotalAmount += TradeAmount;
+            selfStat.TradeCount += TradeCount;
+            ParentNav += "," + UserId + ",";
+            if (!string.IsNullOrEmpty(ParentNav))
+            {
+                string[] ParentNavList = ParentNav.Trim(',').Replace(",,", ",").Split(',');
+                foreach (string NavUserIdString in ParentNavList)
+                {
+                    int NavUserId = int.Parse(NavUserIdString);
+                    UserAmountSummaryOldBefore teamStat = db.UserAmountSummaryOldBefore.FirstOrDefault(m => m.UserId == NavUserId && m.IsAct == IsAct && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.PayMode == PayMode && m.SeoTitle == "team");
+                    if (teamStat == null)
+                    {
+                        teamStat = db.UserAmountSummaryOldBefore.Add(new UserAmountSummaryOldBefore()
+                        {
+                            UserId = NavUserId,
+                            TradeMonth = TradeMonth,
+                            TradeDate = TradeDate,
+                            PayMode = PayMode,
+                            IsAct = IsAct,
+                            SeoTitle = "team",
+                        }).Entity;
+                        db.SaveChanges();
+                    }
+                    teamStat.TotalAmount += TradeAmount;
+                    teamStat.TradeCount += TradeCount;
+                }
+            }
+            db.SaveChanges();
+        }
+
+        public void StatOldAfter(PxcModels.WebCMSEntities db, DataRow selfDr, int UserId, string ParentNav)
+        {
+            int MerchantId = int.Parse(selfDr["MerchantId"].ToString());
+            int PayMode = int.Parse(selfDr["PayMode"].ToString());
+            int IsAct = int.Parse(selfDr["IsAct"].ToString());
+            string SnNo = selfDr["SnNo"].ToString();
+            string TradeDate = selfDr[5].ToString();
+            decimal TradeAmount = decimal.Parse(selfDr[6].ToString());
+            int TradeCount = int.Parse(selfDr[7].ToString());
+            decimal MaxDivi = decimal.Parse(selfDr[8].ToString());
+            decimal ActualAmount = decimal.Parse(selfDr[9].ToString());
+            string TradeMonth = TradeDate.Substring(0, 6);
+
+            //创客交易额
+            UserAmountSummaryOldAfter selfStat = db.UserAmountSummaryOldAfter.FirstOrDefault(m => m.UserId == UserId && m.IsAct == IsAct && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.PayMode == PayMode && m.SeoTitle == "self");
+            if (selfStat == null)
+            {
+                selfStat = db.UserAmountSummaryOldAfter.Add(new UserAmountSummaryOldAfter()
+                {
+                    UserId = UserId,
+                    TradeMonth = TradeMonth,
+                    TradeDate = TradeDate,
+                    PayMode = PayMode,
+                    IsAct = IsAct,
+                    SeoTitle = "self",
+                }).Entity;
+                db.SaveChanges();
+            }
+            selfStat.TotalAmount += TradeAmount;
+            selfStat.TradeCount += TradeCount;
+            ParentNav += "," + UserId + ",";
+            if (!string.IsNullOrEmpty(ParentNav))
+            {
+                string[] ParentNavList = ParentNav.Trim(',').Replace(",,", ",").Split(',');
+                foreach (string NavUserIdString in ParentNavList)
+                {
+                    int NavUserId = int.Parse(NavUserIdString);
+                    UserAmountSummaryOldAfter teamStat = db.UserAmountSummaryOldAfter.FirstOrDefault(m => m.UserId == NavUserId && m.IsAct == IsAct && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.PayMode == PayMode && m.SeoTitle == "team");
+                    if (teamStat == null)
+                    {
+                        teamStat = db.UserAmountSummaryOldAfter.Add(new UserAmountSummaryOldAfter()
+                        {
+                            UserId = NavUserId,
+                            TradeMonth = TradeMonth,
+                            TradeDate = TradeDate,
+                            PayMode = PayMode,
+                            IsAct = IsAct,
+                            SeoTitle = "team",
+                        }).Entity;
+                        db.SaveChanges();
+                    }
+                    teamStat.TotalAmount += TradeAmount;
+                    teamStat.TradeCount += TradeCount;
+                }
+            }
+            db.SaveChanges();
+        }
+
+
+
+    }
+}

+ 381 - 0
AppStart/Helper/StatGdNewService2.cs

@@ -0,0 +1,381 @@
+using System;
+using System.Collections.Generic;
+using Library;
+using LitJson;
+using System.Linq;
+using System.Data;
+using System.Threading;
+using MySystem.PxcModels2;
+using MySystem.KxsProductModels;
+
+namespace MySystem
+{
+    public class StatGdNewService2
+    {
+        public readonly static StatGdNewService2 Instance = new StatGdNewService2();
+        private StatGdNewService2()
+        { }
+
+
+
+
+
+
+        // 统计交易额V2
+        public void Start()
+        {
+            Thread th = new Thread(StartDo);
+            th.IsBackground = true;
+            th.Start();
+        }
+        public void StartDo()
+        {
+            while (true)
+            {
+                if(DateTime.Now.Hour >= 0 && RedisDbconn.Instance.Get<string>("StatServerStatus") == "1")
+                {
+                    StatTradeAmount();
+                }
+                Thread.Sleep(100);
+            }
+        }
+        public void StatTradeAmount()
+        {
+            string connstr = Library.ConfigurationManager.AppSettings["SqlConnStr2"].ToString();
+            function.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"), "统计创客归档交易日志2");
+            PxcModels.WebCMSEntities db1 = new PxcModels.WebCMSEntities();
+            PxcModels2.WebCMSEntities db = new PxcModels2.WebCMSEntities();
+            KxsMainModels.WebCMSEntities maindb = new KxsMainModels.WebCMSEntities();
+            KxsProductModels.WebCMSEntities pdb = new KxsProductModels.WebCMSEntities();
+            using (var tran = db.Database.BeginTransaction())
+            {
+                try
+                {
+                    string start = "2024-10-01 00:00:00";
+                    DataTable idsDt = CustomerSqlConn.dtable("select Id from ConsumerOrders where Id>=3344113 and CreateDate>='" + start + "' and Status>0 and Version=2 order by Id limit 100", connstr);
+                    if(idsDt.Rows.Count > 0)
+                    {
+                        string ids = "";
+                        foreach (DataRow idsDr in idsDt.Rows)
+                        {
+                            ids += idsDr["Id"].ToString() + ",";
+                        }
+                        DataTable selfDt = CustomerSqlConn.dtable("select UserId,MerchantId,SnNo,PayMode,IsAct,DATE_FORMAT(CreateDate,'%Y%m%d'),sum(PayMoney),count(Id),sum(MaxDivi),sum(MerchantActualAmount),Sort from ConsumerOrders where Id in (" + ids.TrimEnd(',') + ") group by UserId,MerchantId,SnNo,PayMode,IsAct,DATE_FORMAT(CreateDate,'%Y%m%d'),Sort", connstr);
+                        if (selfDt.Rows.Count > 0)
+                        {
+                            function.WriteLog("统计人数:" + selfDt.Rows.Count + "\n\n", "统计创客归档交易日志2");
+                            foreach (DataRow selfDr in selfDt.Rows)
+                            {
+                                int UserId = int.Parse(selfDr["UserId"].ToString());
+                                int MerchantId = int.Parse(selfDr["MerchantId"].ToString());
+                                string SnNo = selfDr["SnNo"].ToString();
+                                DateTime BindTime = DateTime.Now;
+                                MerchantInfo merchant = db.MerchantInfo.FirstOrDefault(m => m.Id == MerchantId) ?? new MerchantInfo();
+                                if(merchant.BrandId == 1)
+                                {
+                                    KxsMachine pos = pdb.KxsMachine.FirstOrDefault(m => m.PosSn == SnNo && m.BindStatus == 1);
+                                    if(pos != null)
+                                    {
+                                        UserId = pos.UserId;
+                                    }
+                                }
+                                else
+                                {
+                                    PxcModels.PosMachinesTwo pos = db1.PosMachinesTwo.FirstOrDefault(m => m.PosSn == SnNo) ?? new PxcModels.PosMachinesTwo();
+                                    UserId = pos.UserId;
+                                    BindTime = pos.BindingTime.Value;
+                                }
+                                KxsMainModels.Users user = maindb.Users.FirstOrDefault(m => m.Id == UserId) ?? new KxsMainModels.Users();
+                                string ParentNav = user.ParentNav; //selfDr["ParentNav"].ToString();
+                                if (BindTime < DateTime.Now.AddMonths(-9))
+                                {
+                                    if (BindTime < DateTime.Parse("2025-01-01 00:00:00"))
+                                    {
+                                        StatOldBefore(db, selfDr, UserId, ParentNav);
+                                    }
+                                    else
+                                    {
+                                        StatNewBefore(db, selfDr, UserId, ParentNav);
+                                    }
+                                }
+                                else
+                                {
+                                    if (BindTime < DateTime.Parse("2025-01-01 00:00:00"))
+                                    {
+                                        StatOldAfter(db, selfDr, UserId, ParentNav);
+                                    }
+                                    else
+                                    {
+                                        StatNewAfter(db, selfDr, UserId, ParentNav);
+                                    }
+                                }
+                            }
+                            CustomerSqlConn.op("update ConsumerOrders set Version=3 where Id in (" + ids.TrimEnd(',') + ")", connstr);
+                        }
+                    }
+                    tran.Commit();
+                }
+                catch (Exception ex)
+                {
+                    tran.Rollback();
+                    function.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString(), "统计创客归档交易日志2异常");
+                }
+            }
+            db1.Dispose();
+            db.Dispose();
+            maindb.Dispose();
+            pdb.Dispose();
+            function.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + "\n\n", "统计创客归档交易日志2");
+        }
+
+        
+        public void StatNewBefore(PxcModels2.WebCMSEntities db, DataRow selfDr, int UserId, string ParentNav)
+        {
+            int MerchantId = int.Parse(selfDr["MerchantId"].ToString());
+            int PayMode = int.Parse(selfDr["PayMode"].ToString());
+            int IsAct = int.Parse(selfDr["IsAct"].ToString());
+            string SnNo = selfDr["SnNo"].ToString();
+            string TradeDate = selfDr[5].ToString();
+            decimal TradeAmount = decimal.Parse(selfDr[6].ToString());
+            int TradeCount = int.Parse(selfDr[7].ToString());
+            decimal MaxDivi = decimal.Parse(selfDr[8].ToString());
+            decimal ActualAmount = decimal.Parse(selfDr[9].ToString());
+            string TradeMonth = TradeDate.Substring(0, 6);
+            int Sort = int.Parse(selfDr["Sort"].ToString());
+
+            //创客交易额
+            UserAmountSummaryNewBefore selfStat = db.UserAmountSummaryNewBefore.FirstOrDefault(m => m.Id >= 17385 && m.UserId == UserId && m.IsAct == IsAct && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.PayMode == PayMode && m.SeoTitle == "self" && m.Sort == Sort);
+            if (selfStat == null)
+            {
+                selfStat = db.UserAmountSummaryNewBefore.Add(new UserAmountSummaryNewBefore()
+                {
+                    UserId = UserId,
+                    TradeMonth = TradeMonth,
+                    TradeDate = TradeDate,
+                    PayMode = PayMode,
+                    IsAct = IsAct,
+                    SeoTitle = "self",
+                    Sort = Sort,
+                }).Entity;
+                db.SaveChanges();
+            }
+            selfStat.TotalAmount += TradeAmount;
+            selfStat.TradeCount += TradeCount;
+            ParentNav += "," + UserId + ",";
+            if (!string.IsNullOrEmpty(ParentNav))
+            {
+                string[] ParentNavList = ParentNav.Trim(',').Replace(",,", ",").Split(',');
+                foreach (string NavUserIdString in ParentNavList)
+                {
+                    int NavUserId = int.Parse(NavUserIdString);
+                    UserAmountSummaryNewBefore teamStat = db.UserAmountSummaryNewBefore.FirstOrDefault(m => m.Id >= 17385 && m.UserId == NavUserId && m.IsAct == IsAct && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.PayMode == PayMode && m.SeoTitle == "team" && m.Sort == Sort);
+                    if (teamStat == null)
+                    {
+                        teamStat = db.UserAmountSummaryNewBefore.Add(new UserAmountSummaryNewBefore()
+                        {
+                            UserId = NavUserId,
+                            TradeMonth = TradeMonth,
+                            TradeDate = TradeDate,
+                            PayMode = PayMode,
+                            IsAct = IsAct,
+                            SeoTitle = "team",
+                            Sort = Sort,
+                        }).Entity;
+                        db.SaveChanges();
+                    }
+                    teamStat.TotalAmount += TradeAmount;
+                    teamStat.TradeCount += TradeCount;
+                }
+            }
+            db.SaveChanges();
+        }
+
+        public void StatNewAfter(PxcModels2.WebCMSEntities db, DataRow selfDr, int UserId, string ParentNav)
+        {
+            int MerchantId = int.Parse(selfDr["MerchantId"].ToString());
+            int PayMode = int.Parse(selfDr["PayMode"].ToString());
+            int IsAct = int.Parse(selfDr["IsAct"].ToString());
+            string SnNo = selfDr["SnNo"].ToString();
+            string TradeDate = selfDr[5].ToString();
+            decimal TradeAmount = decimal.Parse(selfDr[6].ToString());
+            int TradeCount = int.Parse(selfDr[7].ToString());
+            decimal MaxDivi = decimal.Parse(selfDr[8].ToString());
+            decimal ActualAmount = decimal.Parse(selfDr[9].ToString());
+            string TradeMonth = TradeDate.Substring(0, 6);
+            int Sort = int.Parse(selfDr["Sort"].ToString());
+
+            //创客交易额
+            UserAmountSummaryNewAfter selfStat = db.UserAmountSummaryNewAfter.FirstOrDefault(m => m.Id >= 805733 && m.UserId == UserId && m.IsAct == IsAct && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.PayMode == PayMode && m.SeoTitle == "self" && m.Sort == Sort);
+            if (selfStat == null)
+            {
+                selfStat = db.UserAmountSummaryNewAfter.Add(new UserAmountSummaryNewAfter()
+                {
+                    UserId = UserId,
+                    TradeMonth = TradeMonth,
+                    TradeDate = TradeDate,
+                    PayMode = PayMode,
+                    IsAct = IsAct,
+                    SeoTitle = "self",
+                    Sort = Sort,
+                }).Entity;
+                db.SaveChanges();
+            }
+            selfStat.TotalAmount += TradeAmount;
+            selfStat.TradeCount += TradeCount;
+            ParentNav += "," + UserId + ",";
+            if (!string.IsNullOrEmpty(ParentNav))
+            {
+                string[] ParentNavList = ParentNav.Trim(',').Replace(",,", ",").Split(',');
+                foreach (string NavUserIdString in ParentNavList)
+                {
+                    int NavUserId = int.Parse(NavUserIdString);
+                    UserAmountSummaryNewAfter teamStat = db.UserAmountSummaryNewAfter.FirstOrDefault(m => m.Id >= 805733 && m.UserId == NavUserId && m.IsAct == IsAct && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.PayMode == PayMode && m.SeoTitle == "team" && m.Sort == Sort);
+                    if (teamStat == null)
+                    {
+                        teamStat = db.UserAmountSummaryNewAfter.Add(new UserAmountSummaryNewAfter()
+                        {
+                            UserId = NavUserId,
+                            TradeMonth = TradeMonth,
+                            TradeDate = TradeDate,
+                            PayMode = PayMode,
+                            IsAct = IsAct,
+                            SeoTitle = "team",
+                            Sort = Sort,
+                        }).Entity;
+                        db.SaveChanges();
+                    }
+                    teamStat.TotalAmount += TradeAmount;
+                    teamStat.TradeCount += TradeCount;
+                }
+            }
+            db.SaveChanges();
+        }
+
+
+
+
+
+        public void StatOldBefore(PxcModels2.WebCMSEntities db, DataRow selfDr, int UserId, string ParentNav)
+        {
+            int MerchantId = int.Parse(selfDr["MerchantId"].ToString());
+            int PayMode = int.Parse(selfDr["PayMode"].ToString());
+            int IsAct = int.Parse(selfDr["IsAct"].ToString());
+            string SnNo = selfDr["SnNo"].ToString();
+            string TradeDate = selfDr[5].ToString();
+            decimal TradeAmount = decimal.Parse(selfDr[6].ToString());
+            int TradeCount = int.Parse(selfDr[7].ToString());
+            decimal MaxDivi = decimal.Parse(selfDr[8].ToString());
+            decimal ActualAmount = decimal.Parse(selfDr[9].ToString());
+            string TradeMonth = TradeDate.Substring(0, 6);
+            int Sort = int.Parse(selfDr["Sort"].ToString());
+
+            //创客交易额
+            UserAmountSummaryOldBefore selfStat = db.UserAmountSummaryOldBefore.FirstOrDefault(m => m.Id >= 17385 && m.UserId == UserId && m.IsAct == IsAct && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.PayMode == PayMode && m.SeoTitle == "self" && m.Sort == Sort);
+            if (selfStat == null)
+            {
+                selfStat = db.UserAmountSummaryOldBefore.Add(new UserAmountSummaryOldBefore()
+                {
+                    UserId = UserId,
+                    TradeMonth = TradeMonth,
+                    TradeDate = TradeDate,
+                    PayMode = PayMode,
+                    IsAct = IsAct,
+                    SeoTitle = "self",
+                    Sort = Sort,
+                }).Entity;
+                db.SaveChanges();
+            }
+            selfStat.TotalAmount += TradeAmount;
+            selfStat.TradeCount += TradeCount;
+            ParentNav += "," + UserId + ",";
+            if (!string.IsNullOrEmpty(ParentNav))
+            {
+                string[] ParentNavList = ParentNav.Trim(',').Replace(",,", ",").Split(',');
+                foreach (string NavUserIdString in ParentNavList)
+                {
+                    int NavUserId = int.Parse(NavUserIdString);
+                    UserAmountSummaryOldBefore teamStat = db.UserAmountSummaryOldBefore.FirstOrDefault(m => m.Id >= 17385 && m.UserId == NavUserId && m.IsAct == IsAct && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.PayMode == PayMode && m.SeoTitle == "team" && m.Sort == Sort);
+                    if (teamStat == null)
+                    {
+                        teamStat = db.UserAmountSummaryOldBefore.Add(new UserAmountSummaryOldBefore()
+                        {
+                            UserId = NavUserId,
+                            TradeMonth = TradeMonth,
+                            TradeDate = TradeDate,
+                            PayMode = PayMode,
+                            IsAct = IsAct,
+                            SeoTitle = "team",
+                            Sort = Sort,
+                        }).Entity;
+                        db.SaveChanges();
+                    }
+                    teamStat.TotalAmount += TradeAmount;
+                    teamStat.TradeCount += TradeCount;
+                }
+            }
+            db.SaveChanges();
+        }
+
+        public void StatOldAfter(PxcModels2.WebCMSEntities db, DataRow selfDr, int UserId, string ParentNav)
+        {
+            int MerchantId = int.Parse(selfDr["MerchantId"].ToString());
+            int PayMode = int.Parse(selfDr["PayMode"].ToString());
+            int IsAct = int.Parse(selfDr["IsAct"].ToString());
+            string SnNo = selfDr["SnNo"].ToString();
+            string TradeDate = selfDr[5].ToString();
+            decimal TradeAmount = decimal.Parse(selfDr[6].ToString());
+            int TradeCount = int.Parse(selfDr[7].ToString());
+            decimal MaxDivi = decimal.Parse(selfDr[8].ToString());
+            decimal ActualAmount = decimal.Parse(selfDr[9].ToString());
+            string TradeMonth = TradeDate.Substring(0, 6);
+            int Sort = int.Parse(selfDr["Sort"].ToString());
+
+            //创客交易额
+            UserAmountSummaryOldAfter selfStat = db.UserAmountSummaryOldAfter.FirstOrDefault(m => m.Id >= 805733 && m.UserId == UserId && m.IsAct == IsAct && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.PayMode == PayMode && m.SeoTitle == "self" && m.Sort == Sort);
+            if (selfStat == null)
+            {
+                selfStat = db.UserAmountSummaryOldAfter.Add(new UserAmountSummaryOldAfter()
+                {
+                    UserId = UserId,
+                    TradeMonth = TradeMonth,
+                    TradeDate = TradeDate,
+                    PayMode = PayMode,
+                    IsAct = IsAct,
+                    SeoTitle = "self",
+                    Sort = Sort,
+                }).Entity;
+                db.SaveChanges();
+            }
+            selfStat.TotalAmount += TradeAmount;
+            selfStat.TradeCount += TradeCount;
+            ParentNav += "," + UserId + ",";
+            if (!string.IsNullOrEmpty(ParentNav))
+            {
+                string[] ParentNavList = ParentNav.Trim(',').Replace(",,", ",").Split(',');
+                foreach (string NavUserIdString in ParentNavList)
+                {
+                    int NavUserId = int.Parse(NavUserIdString);
+                    UserAmountSummaryOldAfter teamStat = db.UserAmountSummaryOldAfter.FirstOrDefault(m => m.Id >= 805733 && m.UserId == NavUserId && m.IsAct == IsAct && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.PayMode == PayMode && m.SeoTitle == "team" && m.Sort == Sort);
+                    if (teamStat == null)
+                    {
+                        teamStat = db.UserAmountSummaryOldAfter.Add(new UserAmountSummaryOldAfter()
+                        {
+                            UserId = NavUserId,
+                            TradeMonth = TradeMonth,
+                            TradeDate = TradeDate,
+                            PayMode = PayMode,
+                            IsAct = IsAct,
+                            SeoTitle = "team",
+                            Sort = Sort,
+                        }).Entity;
+                        db.SaveChanges();
+                    }
+                    teamStat.TotalAmount += TradeAmount;
+                    teamStat.TradeCount += TradeCount;
+                }
+            }
+            db.SaveChanges();
+        }
+
+    }
+}

+ 48 - 0
KxsProductModels/KxsBrand.cs

@@ -0,0 +1,48 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsBrand
+    {
+        public int Id { get; set; }
+        public int CountOfBox { get; set; }
+        public decimal PosPrice { get; set; }
+        public decimal DefaultPledge { get; set; }
+        public decimal ActAmount { get; set; }
+        public decimal FluxProfit { get; set; }
+        public decimal FluxAmount { get; set; }
+        public int Sort { get; set; }
+        public int BrandType { get; set; }
+        public string Cover { get; set; }
+        public string LinkUrl { get; set; }
+        public string Name { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public int ExchangeFlag { get; set; }
+        public string LabelText { get; set; }
+        public string ExchangeType { get; set; }
+        public int DisplayFlag { get; set; }
+        public int RatioFlag { get; set; }
+        public int MerchantFlag { get; set; }
+        public string MerchantDisplay { get; set; }
+        public int AdvanceFlag { get; set; }
+        public int ReplenishFlag { get; set; }
+        public int TotalMethod { get; set; }
+        public decimal ActPrice { get; set; }
+        public int ReplenishNum { get; set; }
+        public string BrandDetail { get; set; }
+        public int PledgeStatus { get; set; }
+        public int PledgeDisplay { get; set; }
+        public string BindRange { get; set; }
+        public int PledgeType { get; set; }
+        public string ManyPledge { get; set; }
+        public int ProfitStatus { get; set; }
+        public int Status { get; set; }
+        public string UpdateBy { get; set; }
+        public decimal NonActAmount { get; set; }
+        public int BrandTypeId { get; set; }
+    }
+}

+ 17 - 0
KxsProductModels/KxsBrandSort.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsBrandSort
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int BrandId { get; set; }
+        public int UserId { get; set; }
+        public int Version { get; set; }
+        public string DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 19 - 0
KxsProductModels/KxsBrandType.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsBrandType
+    {
+        public int Id { get; set; }
+        public int Pid { get; set; }
+        public int IsShow { get; set; }
+        public int Status { get; set; }
+        public int Level { get; set; }
+        public string Name { get; set; }
+        public int Version { get; set; }
+        public string DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 32 - 0
KxsProductModels/KxsGdOrder.cs

@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsGdOrder
+    {
+        public int Id { get; set; }
+        public string AddressDetail { get; set; }
+        public string Address { get; set; }
+        public string ReceiveMobile { get; set; }
+        public string ReceiveName { get; set; }
+        public string IdcardNo { get; set; }
+        public string ErpNo { get; set; }
+        public string ErpName { get; set; }
+        public string OrderNo { get; set; }
+        public string GdMobile { get; set; }
+        public int Status { get; set; }
+        public string Remark { get; set; }
+        public string UserName { get; set; }
+        public string City { get; set; }
+        public string Province { get; set; }
+        public string ProductName { get; set; }
+        public decimal FirstRechargeAmount { get; set; }
+        public string Iccid { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public string EmployNum { get; set; }
+    }
+}

+ 28 - 0
KxsProductModels/KxsGdReport.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsGdReport
+    {
+        public int Id { get; set; }
+        public int IsCheck { get; set; }
+        public string GdMobile { get; set; }
+        public string GdSn { get; set; }
+        public int Status { get; set; }
+        public string Remark { get; set; }
+        public string PutMobile { get; set; }
+        public string PutName { get; set; }
+        public string City { get; set; }
+        public string Province { get; set; }
+        public string UserCode { get; set; }
+        public string Username { get; set; }
+        public int UserId { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public int PutType { get; set; }
+        public int GdOrderId { get; set; }
+    }
+}

+ 53 - 0
KxsProductModels/KxsMachine.cs

@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsMachine
+    {
+        public int Id { get; set; }
+        public string BatchNo { get; set; }
+        public int PreUserId { get; set; }
+        public int ReturnStatus { get; set; }
+        public decimal? SourcePledge { get; set; }
+        public int IsOpAct { get; set; }
+        public int IsSupply { get; set; }
+        public int DownFeeFlag { get; set; }
+        public int PartnerId { get; set; }
+        public int LeaderId { get; set; }
+        public string WarehouseName { get; set; }
+        public int UpFeeFlag { get; set; }
+        public int IsFirst { get; set; }
+        public int Status { get; set; }
+        public int BindStatus { get; set; }
+        public int IsAct { get; set; }
+        public decimal MachineRatio { get; set; }
+        public string BoxSn { get; set; }
+        public DateTime? DeliveryTime { get; set; }
+        public DateTime? ActTime { get; set; }
+        public DateTime? BindTime { get; set; }
+        public string AllotPath { get; set; }
+        public decimal CashPledge { get; set; }
+        public int MachineType { get; set; }
+        public DateTime? RecycleEndTime { get; set; }
+        public int RecycleStatus { get; set; }
+        public int BrandId { get; set; }
+        public int MerchantId { get; set; }
+        public int UserId { get; set; }
+        public int WarehouseId { get; set; }
+        public string PosSn { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public decimal ScanQrTrade { get; set; }
+        public decimal DebitCardTrade { get; set; }
+        public decimal CreditTrade { get; set; }
+        public string SourcePosSn { get; set; }
+        public string DevLocation { get; set; }
+        public decimal SecondFee { get; set; }
+        public int PosType { get; set; }
+        public string DeviceType { get; set; }
+        public string DeviceCode { get; set; }
+    }
+}

+ 20 - 0
KxsProductModels/KxsMachineAdvance.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsMachineAdvance
+    {
+        public int Id { get; set; }
+        public string WarehouseName { get; set; }
+        public string BrandName { get; set; }
+        public int WarehouseId { get; set; }
+        public int ToUserId { get; set; }
+        public int SendUserId { get; set; }
+        public int BrandId { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 24 - 0
KxsProductModels/KxsMachineAdvanceInfo.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsMachineAdvanceInfo
+    {
+        public int Id { get; set; }
+        public int OrderId { get; set; }
+        public int AdvanceId { get; set; }
+        public int IsAdvance { get; set; }
+        public string PosSn { get; set; }
+        public int IsUseAmount { get; set; }
+        public int IsConfirm { get; set; }
+        public DateTime? ReturnTime { get; set; }
+        public int IsReturn { get; set; }
+        public int IsApply { get; set; }
+        public int MachineId { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 22 - 0
KxsProductModels/KxsMachineAward.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsMachineAward
+    {
+        public int Id { get; set; }
+        public decimal Amount { get; set; }
+        public int VariationType { get; set; }
+        public string Username { get; set; }
+        public string UserCode { get; set; }
+        public int UserId { get; set; }
+        public int MachineId { get; set; }
+        public string PosSn { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public int DelFlag { get; set; }
+        public int Version { get; set; }
+        public int AwardType { get; set; }
+    }
+}

+ 22 - 0
KxsProductModels/KxsMachineCashOrder.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsMachineCashOrder
+    {
+        public int Id { get; set; }
+        public string UserCode { get; set; }
+        public string Username { get; set; }
+        public int MachineId { get; set; }
+        public int MachineApplyId { get; set; }
+        public int ShopOrderId { get; set; }
+        public string UpdateBy { get; set; }
+        public string CreateBy { get; set; }
+        public int Version { get; set; }
+        public string DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 20 - 0
KxsProductModels/KxsMachineCirculationLog.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsMachineCirculationLog
+    {
+        public int Id { get; set; }
+        public string SourceSn { get; set; }
+        public int OrderId { get; set; }
+        public int UserId { get; set; }
+        public string PidPath { get; set; }
+        public int Pid { get; set; }
+        public int MachineId { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 35 - 0
KxsProductModels/KxsMachineCutBind.cs

@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsMachineCutBind
+    {
+        public int Id { get; set; }
+        public string CutPosSn { get; set; }
+        public int CutBrandId { get; set; }
+        public string UserCode { get; set; }
+        public string Username { get; set; }
+        public string OutWhsAddress { get; set; }
+        public string OutWhsMobile { get; set; }
+        public string OutWhsName { get; set; }
+        public int OutWhsId { get; set; }
+        public string ToWhsAddress { get; set; }
+        public string ToWhsMobile { get; set; }
+        public string UpdateBy { get; set; }
+        public string ToWhsName { get; set; }
+        public int ToWhsId { get; set; }
+        public string Remark { get; set; }
+        public int CutType { get; set; }
+        public string CreateBy { get; set; }
+        public int UserId { get; set; }
+        public int BrandId { get; set; }
+        public string PosSn { get; set; }
+        public int Version { get; set; }
+        public string DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public string OrderSn { get; set; }
+        public int IsNotify { get; set; }
+    }
+}

+ 17 - 0
KxsProductModels/KxsMachineDeduct.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsMachineDeduct
+    {
+        public int Id { get; set; }
+        public string Remark { get; set; }
+        public string PosSn { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public int? BrandId { get; set; }
+    }
+}

+ 19 - 0
KxsProductModels/KxsMachineExpInfo.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsMachineExpInfo
+    {
+        public int Id { get; set; }
+        public int UserId { get; set; }
+        public int MachineId { get; set; }
+        public int AdvanceId { get; set; }
+        public string UpdateBy { get; set; }
+        public string CreateBy { get; set; }
+        public int Version { get; set; }
+        public string DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 22 - 0
KxsProductModels/KxsMachinePledge.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsMachinePledge
+    {
+        public int Id { get; set; }
+        public string Result { get; set; }
+        public int? BrandId { get; set; }
+        public string CreateBy { get; set; }
+        public string Remark { get; set; }
+        public decimal AfterPledge { get; set; }
+        public decimal BeforePledge { get; set; }
+        public string PosSn { get; set; }
+        public int UserId { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 26 - 0
KxsProductModels/KxsMachineRatio.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsMachineRatio
+    {
+        public int Id { get; set; }
+        public int MachineId { get; set; }
+        public int Status { get; set; }
+        public int MerchantId { get; set; }
+        public string Result { get; set; }
+        public int BrandId { get; set; }
+        public string CreateBy { get; set; }
+        public string Remark { get; set; }
+        public decimal Ratio { get; set; }
+        public string PosSn { get; set; }
+        public int UserId { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public int? PosUserId { get; set; }
+        public decimal BeforeRatio { get; set; }
+    }
+}

+ 25 - 0
KxsProductModels/KxsMachineTrack.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsMachineTrack
+    {
+        public int Id { get; set; }
+        public int ChangeType { get; set; }
+        public int TrackType { get; set; }
+        public int BrandId { get; set; }
+        public int MachineId { get; set; }
+        public int AfterUserId { get; set; }
+        public int BeforeUserId { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public int PartnerId { get; set; }
+        public string PosSn { get; set; }
+        public int BeforeWhsId { get; set; }
+        public int AfterWhsId { get; set; }
+        public string Remark { get; set; }
+    }
+}

+ 24 - 0
KxsProductModels/KxsMachineTransfer.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsMachineTransfer
+    {
+        public int Id { get; set; }
+        public string ToUserCode { get; set; }
+        public string ToUserName { get; set; }
+        public int MachineId { get; set; }
+        public int TransferType { get; set; }
+        public int MachineType { get; set; }
+        public int ToUserId { get; set; }
+        public int BrandId { get; set; }
+        public int SendUserId { get; set; }
+        public string MachineSn { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public string Remark { get; set; }
+    }
+}

+ 21 - 0
KxsProductModels/KxsMachineUnbind.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsMachineUnbind
+    {
+        public int Id { get; set; }
+        public string ApplyNo { get; set; }
+        public int MchId { get; set; }
+        public string CreateBy { get; set; }
+        public string Remark { get; set; }
+        public int UserId { get; set; }
+        public int BrandId { get; set; }
+        public string PosSn { get; set; }
+        public int Version { get; set; }
+        public string DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 30 - 0
KxsProductModels/KxsMerchant.cs

@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsMerchant
+    {
+        public int Id { get; set; }
+        public string Remark { get; set; }
+        public int StandardMonths { get; set; }
+        public int StandardStatus { get; set; }
+        public int MakerUserId { get; set; }
+        public int IsMaker { get; set; }
+        public string Address { get; set; }
+        public int Status { get; set; }
+        public int BrandId { get; set; }
+        public string MerchantPhone { get; set; }
+        public int UserId { get; set; }
+        public int MachineId { get; set; }
+        public string MerchantCard { get; set; }
+        public string MerchantName { get; set; }
+        public string MerchantNo { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public decimal TotalAmt { get; set; }
+        public DateTime? StandardTime { get; set; }
+    }
+}

+ 26 - 0
KxsProductModels/KxsMerchantReturn.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsMerchantReturn
+    {
+        public int Id { get; set; }
+        public int PayKind { get; set; }
+        public decimal ReturnAmt { get; set; }
+        public int Status { get; set; }
+        public int MchId { get; set; }
+        public int UserId { get; set; }
+        public string OrderSn { get; set; }
+        public string Remark { get; set; }
+        public string UpdateBy { get; set; }
+        public string CreateBy { get; set; }
+        public string BankName { get; set; }
+        public string BankNo { get; set; }
+        public string AliAccount { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public string DelFlag { get; set; }
+        public int Version { get; set; }
+    }
+}

+ 25 - 0
KxsProductModels/KxsMerchantTrade.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsMerchantTrade
+    {
+        public int Id { get; set; }
+        public string LvKey { get; set; }
+        public int CloudPayFlag { get; set; }
+        public int DebitTopFlag { get; set; }
+        public int CardType { get; set; }
+        public string TradeNo { get; set; }
+        public string PosSn { get; set; }
+        public string UserCode { get; set; }
+        public string Username { get; set; }
+        public int BrandId { get; set; }
+        public decimal TradeAmt { get; set; }
+        public long MchId { get; set; }
+        public int Version { get; set; }
+        public string DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 20 - 0
KxsProductModels/KxsMerchantUser.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsMerchantUser
+    {
+        public int Id { get; set; }
+        public int Status { get; set; }
+        public string IdCard { get; set; }
+        public string Username { get; set; }
+        public string Phone { get; set; }
+        public string UpdateBy { get; set; }
+        public string CreateBy { get; set; }
+        public int Version { get; set; }
+        public string DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 22 - 0
KxsProductModels/KxsShopCate.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsShopCate
+    {
+        public int Id { get; set; }
+        public string ColId { get; set; }
+        public int IsShow { get; set; }
+        public int Sort { get; set; }
+        public int Status { get; set; }
+        public string IconUrl { get; set; }
+        public int Level { get; set; }
+        public int Pid { get; set; }
+        public string Name { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 28 - 0
KxsProductModels/KxsShopGoods.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsShopGoods
+    {
+        public int Id { get; set; }
+        public string SpecList { get; set; }
+        public int Sort { get; set; }
+        public DateTime? DownTime { get; set; }
+        public DateTime? UpTime { get; set; }
+        public int GoodsType { get; set; }
+        public int StartByCount { get; set; }
+        public int LimitCount { get; set; }
+        public string ColId { get; set; }
+        public int Status { get; set; }
+        public string Details { get; set; }
+        public string Subtitle { get; set; }
+        public decimal Price { get; set; }
+        public string GoodsName { get; set; }
+        public string PicUrl { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 17 - 0
KxsProductModels/KxsShopGoodsPic.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsShopGoodsPic
+    {
+        public int Id { get; set; }
+        public string Url { get; set; }
+        public int Sort { get; set; }
+        public int GoodsId { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 22 - 0
KxsProductModels/KxsShopGoodsSku.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsShopGoodsSku
+    {
+        public int Id { get; set; }
+        public string Specifications { get; set; }
+        public string Image { get; set; }
+        public int Sales { get; set; }
+        public int StockNum { get; set; }
+        public decimal Price { get; set; }
+        public int StartByCount { get; set; }
+        public int LimitCount { get; set; }
+        public int GoodId { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 18 - 0
KxsProductModels/KxsShopGoodsSpec.cs

@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsShopGoodsSpec
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int GoodsId { get; set; }
+        public string Value { get; set; }
+        public string Specifications { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 38 - 0
KxsProductModels/KxsShopOrder.cs

@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsShopOrder
+    {
+        public int Id { get; set; }
+        public int TopUserId { get; set; }
+        public decimal ReturnPrice { get; set; }
+        public string UpdateBy { get; set; }
+        public string ReturnReason { get; set; }
+        public int OrderType { get; set; }
+        public int WarehouseId { get; set; }
+        public string TradeNo { get; set; }
+        public decimal PayPrice { get; set; }
+        public decimal TotalPrice { get; set; }
+        public DateTime? ReturnTime { get; set; }
+        public int ReturnStatus { get; set; }
+        public int Status { get; set; }
+        public string ErpName { get; set; }
+        public string ErpSn { get; set; }
+        public string Address { get; set; }
+        public string Phone { get; set; }
+        public string Consignee { get; set; }
+        public string Remark { get; set; }
+        public DateTime? SendTime { get; set; }
+        public DateTime? PayTime { get; set; }
+        public int PayType { get; set; }
+        public int GetMode { get; set; }
+        public int UserId { get; set; }
+        public string OrderSn { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 22 - 0
KxsProductModels/KxsShopOrderInfo.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsShopOrderInfo
+    {
+        public int Id { get; set; }
+        public string Specifications { get; set; }
+        public int SkuId { get; set; }
+        public int OrderId { get; set; }
+        public string GoodsName { get; set; }
+        public string PicUrl { get; set; }
+        public decimal GoodsPrice { get; set; }
+        public int Number { get; set; }
+        public int GoodsId { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 22 - 0
KxsProductModels/KxsTicket.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsTicket
+    {
+        public int Id { get; set; }
+        public int PartnerId { get; set; }
+        public int LeaderId { get; set; }
+        public int Status { get; set; }
+        public int OrderId { get; set; }
+        public string TicketAllotPath { get; set; }
+        public int TicketType { get; set; }
+        public string TicketCode { get; set; }
+        public int UserId { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 24 - 0
KxsProductModels/KxsTicketTransfer.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsTicketTransfer
+    {
+        public int Id { get; set; }
+        public string OrderSn { get; set; }
+        public string SendUserCode { get; set; }
+        public string SendUserName { get; set; }
+        public string ToUserCode { get; set; }
+        public string ToUserName { get; set; }
+        public int TicketType { get; set; }
+        public int TransferNum { get; set; }
+        public int ToUserId { get; set; }
+        public int SendUserId { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public string Remark { get; set; }
+    }
+}

+ 17 - 0
KxsProductModels/KxsTicketTransferInfo.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsTicketTransferInfo
+    {
+        public int Id { get; set; }
+        public string TicketCode { get; set; }
+        public string OrderSn { get; set; }
+        public int TicketId { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 22 - 0
KxsProductModels/KxsTicketUpgrade.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class KxsTicketUpgrade
+    {
+        public int Id { get; set; }
+        public int SourceCount { get; set; }
+        public string SourceTickets { get; set; }
+        public string UpTickets { get; set; }
+        public int UpCount { get; set; }
+        public string Remark { get; set; }
+        public int UserId { get; set; }
+        public int Version { get; set; }
+        public string DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public string Username { get; set; }
+        public string UserCode { get; set; }
+    }
+}

+ 16 - 0
KxsProductModels/UndoLog.cs

@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class UndoLog
+    {
+        public long BranchId { get; set; }
+        public string Xid { get; set; }
+        public string Context { get; set; }
+        public byte[] RollbackInfo { get; set; }
+        public int LogStatus { get; set; }
+        public DateTime LogCreated { get; set; }
+        public DateTime LogModified { get; set; }
+    }
+}

+ 3240 - 0
KxsProductModels/WebCMSEntities.cs

@@ -0,0 +1,3240 @@
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata;
+
+namespace MySystem.KxsProductModels
+{
+    public partial class WebCMSEntities : DbContext
+    {
+        public WebCMSEntities()
+        {
+        }
+
+        public WebCMSEntities(DbContextOptions<WebCMSEntities> options)
+            : base(options)
+        {
+        }
+
+        public virtual DbSet<KxsBrand> KxsBrand { get; set; }
+        public virtual DbSet<KxsBrandSort> KxsBrandSort { get; set; }
+        public virtual DbSet<KxsBrandType> KxsBrandType { get; set; }
+        public virtual DbSet<KxsGdOrder> KxsGdOrder { get; set; }
+        public virtual DbSet<KxsGdReport> KxsGdReport { get; set; }
+        public virtual DbSet<KxsMachine> KxsMachine { get; set; }
+        public virtual DbSet<KxsMachineAdvance> KxsMachineAdvance { get; set; }
+        public virtual DbSet<KxsMachineAdvanceInfo> KxsMachineAdvanceInfo { get; set; }
+        public virtual DbSet<KxsMachineAward> KxsMachineAward { get; set; }
+        public virtual DbSet<KxsMachineCashOrder> KxsMachineCashOrder { get; set; }
+        public virtual DbSet<KxsMachineCirculationLog> KxsMachineCirculationLog { get; set; }
+        public virtual DbSet<KxsMachineCutBind> KxsMachineCutBind { get; set; }
+        public virtual DbSet<KxsMachineDeduct> KxsMachineDeduct { get; set; }
+        public virtual DbSet<KxsMachineExpInfo> KxsMachineExpInfo { get; set; }
+        public virtual DbSet<KxsMachinePledge> KxsMachinePledge { get; set; }
+        public virtual DbSet<KxsMachineRatio> KxsMachineRatio { get; set; }
+        public virtual DbSet<KxsMachineTrack> KxsMachineTrack { get; set; }
+        public virtual DbSet<KxsMachineTransfer> KxsMachineTransfer { get; set; }
+        public virtual DbSet<KxsMachineUnbind> KxsMachineUnbind { get; set; }
+        public virtual DbSet<KxsMerchant> KxsMerchant { get; set; }
+        public virtual DbSet<KxsMerchantReturn> KxsMerchantReturn { get; set; }
+        public virtual DbSet<KxsMerchantTrade> KxsMerchantTrade { get; set; }
+        public virtual DbSet<KxsMerchantUser> KxsMerchantUser { get; set; }
+        public virtual DbSet<KxsShopCate> KxsShopCate { get; set; }
+        public virtual DbSet<KxsShopGoods> KxsShopGoods { get; set; }
+        public virtual DbSet<KxsShopGoodsPic> KxsShopGoodsPic { get; set; }
+        public virtual DbSet<KxsShopGoodsSku> KxsShopGoodsSku { get; set; }
+        public virtual DbSet<KxsShopGoodsSpec> KxsShopGoodsSpec { get; set; }
+        public virtual DbSet<KxsShopOrder> KxsShopOrder { get; set; }
+        public virtual DbSet<KxsShopOrderInfo> KxsShopOrderInfo { get; set; }
+        public virtual DbSet<KxsTicket> KxsTicket { get; set; }
+        public virtual DbSet<KxsTicketTransfer> KxsTicketTransfer { get; set; }
+        public virtual DbSet<KxsTicketTransferInfo> KxsTicketTransferInfo { get; set; }
+        public virtual DbSet<KxsTicketUpgrade> KxsTicketUpgrade { get; set; }
+        public virtual DbSet<UndoLog> UndoLog { get; set; }
+
+        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
+        {
+            if (!optionsBuilder.IsConfigured)
+            {
+                optionsBuilder.UseMySql(Library.ConfigurationManager.AppSettings["KxsProductSqlConnStr"].ToString(), x => x.ServerVersion("5.7.17-mysql"));
+            }
+        }
+
+        protected override void OnModelCreating(ModelBuilder modelBuilder)
+        {
+            modelBuilder.Entity<KxsBrand>(entity =>
+            {
+                entity.ToTable("kxs_brand");
+
+                entity.HasComment("客小爽品牌表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.ActAmount)
+                    .HasColumnName("act_amount")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("激活金额");
+
+                entity.Property(e => e.ActPrice)
+                    .HasColumnName("act_price")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("激活1户计多少元");
+
+                entity.Property(e => e.AdvanceFlag)
+                    .HasColumnName("advance_flag")
+                    .HasDefaultValueSql("'1'")
+                    .HasComment("是否支持预发(0:不支持,1:支持)");
+
+                entity.Property(e => e.BindRange)
+                    .HasColumnName("bind_range")
+                    .HasColumnType("varchar(10)")
+                    .HasComment("功能显示范围(0:未绑定机具,1:已绑定机具)")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.BrandDetail)
+                    .HasColumnName("brand_detail")
+                    .HasColumnType("longtext")
+                    .HasComment("产品详情")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.BrandType)
+                    .HasColumnName("brand_type")
+                    .HasComment("类型 0电签 1大pos");
+
+                entity.Property(e => e.BrandTypeId)
+                    .HasColumnName("brand_type_id")
+                    .HasComment("品牌分类ID");
+
+                entity.Property(e => e.CountOfBox)
+                    .HasColumnName("count_of_box")
+                    .HasComment("每箱机具数");
+
+                entity.Property(e => e.Cover)
+                    .HasColumnName("cover")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("封面图片")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DefaultPledge)
+                    .HasColumnName("default_pledge")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("默认押金");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.DisplayFlag)
+                    .HasColumnName("display_flag")
+                    .HasDefaultValueSql("'1'")
+                    .HasComment("是否显示产品(0:不显示,1:显示)");
+
+                entity.Property(e => e.ExchangeFlag)
+                    .HasColumnName("exchange_flag")
+                    .HasComment("是否支持兑换");
+
+                entity.Property(e => e.ExchangeType)
+                    .HasColumnName("exchange_type")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("兑换类型(10:大POS,11:大pos卷循环资格,20:电签,21电签循环资格)")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.FluxAmount)
+                    .HasColumnName("flux_amount")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("流量费");
+
+                entity.Property(e => e.FluxProfit)
+                    .HasColumnName("flux_profit")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("流量费分佣");
+
+                entity.Property(e => e.LabelText)
+                    .HasColumnName("label_text")
+                    .HasColumnType("varchar(200)")
+                    .HasComment("标签json数据(style:样式,wordColor:文字颜色,backColor:背景颜色)")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.LinkUrl)
+                    .HasColumnName("link_url")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("跳转链接")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.ManyPledge)
+                    .HasColumnName("many_pledge")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("多押金设置(多个押金用\",\"隔开)")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.MerchantDisplay)
+                    .HasColumnName("merchant_display")
+                    .HasColumnType("varchar(10)")
+                    .HasComment("商户显示信息(1:商户信息,2:月度交易额,3:月度交易额记录)")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.MerchantFlag)
+                    .HasColumnName("merchant_flag")
+                    .HasDefaultValueSql("'1'")
+                    .HasComment("是否可转商户型创客(0:不支持,1:支持)");
+
+                entity.Property(e => e.Name)
+                    .HasColumnName("name")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("品牌名称")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.NonActAmount)
+                    .HasColumnName("non_act_amount")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("无押激活金额");
+
+                entity.Property(e => e.PledgeDisplay)
+                    .HasColumnName("pledge_display")
+                    .HasDefaultValueSql("'1'")
+                    .HasComment("押金是否显示(0:不显示,1:显示)");
+
+                entity.Property(e => e.PledgeStatus)
+                    .HasColumnName("pledge_status")
+                    .HasDefaultValueSql("'1'")
+                    .HasComment("押金状态(0:关闭,1:开启)");
+
+                entity.Property(e => e.PledgeType)
+                    .HasColumnName("pledge_type")
+                    .HasComment("押金类型(0:固定数值,1:多个数值)");
+
+                entity.Property(e => e.PosPrice)
+                    .HasColumnName("pos_price")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("品牌价格");
+
+                entity.Property(e => e.ProfitStatus)
+                    .HasColumnName("profit_status")
+                    .HasComment("分佣状态(0:未开启,1:开启)");
+
+                entity.Property(e => e.RatioFlag)
+                    .HasColumnName("ratio_flag")
+                    .HasDefaultValueSql("'1'")
+                    .HasComment("是否支持费率修改(0:不支持,1:支持)");
+
+                entity.Property(e => e.ReplenishFlag)
+                    .HasColumnName("replenish_flag")
+                    .HasDefaultValueSql("'1'")
+                    .HasComment("是否支持补货(0:不支持,1:支持)");
+
+                entity.Property(e => e.ReplenishNum)
+                    .HasColumnName("replenish_num")
+                    .HasDefaultValueSql("'10'")
+                    .HasComment("申请补货数量");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnName("sort")
+                    .HasComment("排序");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasDefaultValueSql("'1'")
+                    .HasComment("状态 0禁用 1正常");
+
+                entity.Property(e => e.TotalMethod)
+                    .HasColumnName("total_method")
+                    .HasComment("统计方式(0:实际交易额,1:激活商户数)");
+
+                entity.Property(e => e.UpdateBy)
+                    .HasColumnName("update_by")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("操作人")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsBrandSort>(entity =>
+            {
+                entity.ToTable("kxs_brand_sort");
+
+                entity.HasComment("品牌排序表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.BrandId)
+                    .HasColumnName("brand_id")
+                    .HasComment("品牌ID");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasColumnType("varchar(1)")
+                    .HasDefaultValueSql("'0'")
+                    .HasComment("删除标记,0未删除,1已删除")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnName("sort")
+                    .HasDefaultValueSql("'100'")
+                    .HasComment("排序");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasComment("用户ID");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsBrandType>(entity =>
+            {
+                entity.ToTable("kxs_brand_type");
+
+                entity.HasComment("品牌分类表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasColumnType("varchar(1)")
+                    .HasDefaultValueSql("'0'")
+                    .HasComment("删除标记,0未删除,1已删除")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.IsShow)
+                    .HasColumnName("is_show")
+                    .HasComment("是否显示 0不显示 1显示");
+
+                entity.Property(e => e.Level)
+                    .HasColumnName("level")
+                    .HasComment("分类等级");
+
+                entity.Property(e => e.Name)
+                    .HasColumnName("name")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("分类名称")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Pid)
+                    .HasColumnName("pid")
+                    .HasComment("父级ID");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasComment("0禁用 1启用");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsGdOrder>(entity =>
+            {
+                entity.ToTable("kxs_gd_order");
+
+                entity.HasComment("广电推送订单信息表");
+
+                entity.HasIndex(e => e.GdMobile)
+                    .HasName("mobile");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.Address)
+                    .HasColumnName("address")
+                    .HasColumnType("varchar(128)")
+                    .HasComment("收货详细地址")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.AddressDetail)
+                    .HasColumnName("address_detail")
+                    .HasColumnType("varchar(128)")
+                    .HasComment("详细地址")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.City)
+                    .HasColumnName("city")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("城市")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.EmployNum)
+                    .HasColumnName("employ_num")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("工号自定义参数")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.ErpName)
+                    .HasColumnName("erp_name")
+                    .HasColumnType("varchar(128)")
+                    .HasComment("快递公司")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.ErpNo)
+                    .HasColumnName("erp_no")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("快递单号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.FirstRechargeAmount)
+                    .HasColumnName("first_recharge_amount")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("首充金额");
+
+                entity.Property(e => e.GdMobile)
+                    .HasColumnName("gd_mobile")
+                    .HasColumnType("varchar(16)")
+                    .HasComment("广电手机号码")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Iccid)
+                    .HasColumnName("iccid")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("广电sn")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.IdcardNo)
+                    .HasColumnName("idcard_no")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("身份证号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.OrderNo)
+                    .HasColumnName("order_no")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("广电订单号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.ProductName)
+                    .HasColumnName("product_name")
+                    .HasColumnType("varchar(128)")
+                    .HasComment("产品名称")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Province)
+                    .HasColumnName("province")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("省份")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.ReceiveMobile)
+                    .HasColumnName("receive_mobile")
+                    .HasColumnType("varchar(16)")
+                    .HasComment("收货手机号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.ReceiveName)
+                    .HasColumnName("receive_name")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("收货人")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnName("remark")
+                    .HasColumnType("varchar(1000)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasComment("状态");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserName)
+                    .HasColumnName("user_name")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("入网姓名")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsGdReport>(entity =>
+            {
+                entity.ToTable("kxs_gd_report");
+
+                entity.HasComment("广电报备入网表");
+
+                entity.HasIndex(e => e.GdMobile)
+                    .HasName("gd_mobile");
+
+                entity.HasIndex(e => new { e.PutMobile, e.PutName })
+                    .HasName("query");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.City)
+                    .HasColumnName("city")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("报备城市")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.GdMobile)
+                    .HasColumnName("gd_mobile")
+                    .HasColumnType("varchar(16)")
+                    .HasComment("广电手机号码")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.GdOrderId)
+                    .HasColumnName("gd_order_id")
+                    .HasComment("广电订单ID");
+
+                entity.Property(e => e.GdSn)
+                    .HasColumnName("gd_sn")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("sn码")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.IsCheck)
+                    .HasColumnName("is_check")
+                    .HasComment("匹配状态 未匹配=0 匹配成功=1");
+
+                entity.Property(e => e.Province)
+                    .HasColumnName("province")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("报备省份")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.PutMobile)
+                    .HasColumnName("put_mobile")
+                    .HasColumnType("varchar(16)")
+                    .HasComment("入网手机号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.PutName)
+                    .HasColumnName("put_name")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("入网姓名")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.PutType)
+                    .HasColumnName("put_type")
+                    .HasComment("入网类型  0工号报备 1电渠报备");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnName("remark")
+                    .HasColumnType("varchar(1000)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasComment("状态 未处理=0 已作废=-1 报备成功=1");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserCode)
+                    .HasColumnName("user_code")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("创客编号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasComment("创客ID");
+
+                entity.Property(e => e.Username)
+                    .HasColumnName("username")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("创客姓名")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsMachine>(entity =>
+            {
+                entity.ToTable("kxs_machine");
+
+                entity.HasComment("客小爽机具表");
+
+                entity.HasIndex(e => e.BrandId)
+                    .HasName("brand_id");
+
+                entity.HasIndex(e => e.PosSn)
+                    .HasName("pos_sn")
+                    .IsUnique();
+
+                entity.HasIndex(e => e.WarehouseId)
+                    .HasName("whs_id");
+
+                entity.HasIndex(e => new { e.UserId, e.BindStatus })
+                    .HasName("recycleend");
+
+                entity.HasIndex(e => new { e.Status, e.PreUserId, e.WarehouseId, e.BrandId, e.PosSn })
+                    .HasName("pre_query");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.ActTime)
+                    .HasColumnName("act_time")
+                    .HasColumnType("datetime")
+                    .HasComment("激活时间");
+
+                entity.Property(e => e.AllotPath)
+                    .HasColumnName("allot_path")
+                    .HasColumnType("varchar(128)")
+                    .HasComment("机具轨迹路径")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.BatchNo)
+                    .HasColumnName("batch_no")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("业务批次号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.BindStatus)
+                    .HasColumnName("bind_status")
+                    .HasComment("绑定状态 0未绑定 1已绑定 2已解绑");
+
+                entity.Property(e => e.BindTime)
+                    .HasColumnName("bind_time")
+                    .HasColumnType("datetime")
+                    .HasComment("绑定时间");
+
+                entity.Property(e => e.BoxSn)
+                    .HasColumnName("box_sn")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("箱码")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.BrandId)
+                    .HasColumnName("brand_id")
+                    .HasComment("品牌ID");
+
+                entity.Property(e => e.CashPledge)
+                    .HasColumnName("cash_pledge")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("机具押金");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.CreditTrade)
+                    .HasColumnName("credit_trade")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("贷记卡交易额");
+
+                entity.Property(e => e.DebitCardTrade)
+                    .HasColumnName("debit_card_trade")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("借记卡交易额");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.DeliveryTime)
+                    .HasColumnName("delivery_time")
+                    .HasColumnType("datetime")
+                    .HasComment("出库时间");
+
+                entity.Property(e => e.DevLocation)
+                    .HasColumnName("dev_location")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("机具地址")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.DeviceCode)
+                    .HasColumnName("device_code")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("设备型号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.DeviceType)
+                    .HasColumnName("device_type")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("设备类型")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.DownFeeFlag)
+                    .HasColumnName("down_fee_flag")
+                    .HasComment("费率调降标记 0未调 1已调");
+
+                entity.Property(e => e.IsAct)
+                    .HasColumnName("is_act")
+                    .HasComment("是否激活 0未激活 1已激活");
+
+                entity.Property(e => e.IsFirst)
+                    .HasColumnName("is_first")
+                    .HasComment("是否首台 0否 1是");
+
+                entity.Property(e => e.IsOpAct)
+                    .HasColumnName("is_op_act")
+                    .HasComment("补激活奖标记 0未补录 1已补录");
+
+                entity.Property(e => e.IsSupply)
+                    .HasColumnName("is_supply")
+                    .HasComment("补录标识 0未补录 1已补录");
+
+                entity.Property(e => e.LeaderId)
+                    .HasColumnName("leader_id")
+                    .HasComment("盟主用户ID");
+
+                entity.Property(e => e.MachineRatio)
+                    .HasColumnName("machine_ratio")
+                    .HasColumnType("decimal(18,2)")
+                    .HasDefaultValueSql("'0.60'")
+                    .HasComment("机具费率");
+
+                entity.Property(e => e.MachineType)
+                    .HasColumnName("machine_type")
+                    .HasComment("机具类型 0兑换机 1循环机");
+
+                entity.Property(e => e.MerchantId)
+                    .HasColumnName("merchant_id")
+                    .HasComment("商户ID");
+
+                entity.Property(e => e.PartnerId)
+                    .HasColumnName("partner_id")
+                    .HasComment("合伙人用户ID");
+
+                entity.Property(e => e.PosSn)
+                    .HasColumnName("pos_sn")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("机具码")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.PosType)
+                    .HasColumnName("pos_type")
+                    .HasDefaultValueSql("'2'")
+                    .HasComment("机具活动类型 0空白机 1活动机 2正常兑换 101营训");
+
+                entity.Property(e => e.PreUserId)
+                    .HasColumnName("pre_user_id")
+                    .HasComment("预发到用户的ID");
+
+                entity.Property(e => e.RecycleEndTime)
+                    .HasColumnName("recycle_end_time")
+                    .HasColumnType("datetime")
+                    .HasComment("循环结束时间");
+
+                entity.Property(e => e.RecycleStatus)
+                    .HasColumnName("recycle_status")
+                    .HasComment("循环状态 0不可循环 1可循环");
+
+                entity.Property(e => e.ReturnStatus)
+                    .HasColumnName("return_status")
+                    .HasComment("回收状态 待回收=1 待确认=2 已确认=3 已驳回=4 已撤回=-1");
+
+                entity.Property(e => e.ScanQrTrade)
+                    .HasColumnName("scan_qr_trade")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("扫码交易额");
+
+                entity.Property(e => e.SecondFee)
+                    .HasColumnName("second_fee")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("秒到费");
+
+                entity.Property(e => e.SourcePledge)
+                    .HasColumnName("source_pledge")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("厂家押金");
+
+                entity.Property(e => e.SourcePosSn)
+                    .HasColumnName("source_pos_sn")
+                    .HasColumnType("varchar(128)")
+                    .HasComment("溯源机具和兑换券")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasComment("状态 -1坏机 0在库 1出库 ");
+
+                entity.Property(e => e.UpFeeFlag)
+                    .HasColumnName("up_fee_flag")
+                    .HasComment("费率调降标记 0未调 1已调整");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasComment("所属创客ID");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+
+                entity.Property(e => e.WarehouseId)
+                    .HasColumnName("warehouse_id")
+                    .HasComment("仓库ID");
+
+                entity.Property(e => e.WarehouseName)
+                    .HasColumnName("warehouse_name")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("仓库名称")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+            });
+
+            modelBuilder.Entity<KxsMachineAdvance>(entity =>
+            {
+                entity.ToTable("kxs_machine_advance");
+
+                entity.HasComment("客小爽预发机表");
+
+                entity.HasIndex(e => e.SendUserId)
+                    .HasName("query");
+
+                entity.HasIndex(e => e.ToUserId)
+                    .HasName("toUserId");
+
+                entity.HasIndex(e => e.WarehouseId)
+                    .HasName("whsId");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.BrandId)
+                    .HasColumnName("brand_id")
+                    .HasComment("品牌ID");
+
+                entity.Property(e => e.BrandName)
+                    .HasColumnName("brand_name")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("品牌名称")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.SendUserId)
+                    .HasColumnName("send_user_id")
+                    .HasComment("发货人ID");
+
+                entity.Property(e => e.ToUserId)
+                    .HasColumnName("to_user_id")
+                    .HasComment("接收人ID");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+
+                entity.Property(e => e.WarehouseId)
+                    .HasColumnName("warehouse_id")
+                    .HasComment("发货仓库ID");
+
+                entity.Property(e => e.WarehouseName)
+                    .HasColumnName("warehouse_name")
+                    .HasColumnType("varchar(128)")
+                    .HasComment("仓库名称")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+            });
+
+            modelBuilder.Entity<KxsMachineAdvanceInfo>(entity =>
+            {
+                entity.ToTable("kxs_machine_advance_info");
+
+                entity.HasComment("客小爽预发机明细表");
+
+                entity.HasIndex(e => new { e.OrderId, e.IsConfirm, e.IsReturn, e.IsApply, e.IsUseAmount, e.IsAdvance })
+                    .HasName("query");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.AdvanceId)
+                    .HasColumnName("advance_id")
+                    .HasComment("预扣款表ID");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.IsAdvance)
+                    .HasColumnName("is_advance")
+                    .HasComment("是否预扣款 0否 1是");
+
+                entity.Property(e => e.IsApply)
+                    .HasColumnName("is_apply")
+                    .HasComment("是否申请机具 0未申请 1已申请");
+
+                entity.Property(e => e.IsConfirm)
+                    .HasColumnName("is_confirm")
+                    .HasComment("是否确认收货 0未确认 1已确认 2已拒绝");
+
+                entity.Property(e => e.IsReturn)
+                    .HasColumnName("is_return")
+                    .HasComment("是否撤回 0未撤回 1已撤回");
+
+                entity.Property(e => e.IsUseAmount)
+                    .HasColumnName("is_use_amount")
+                    .HasComment("是否占用预发额度 0否 1是");
+
+                entity.Property(e => e.MachineId)
+                    .HasColumnName("machine_id")
+                    .HasComment("机具ID");
+
+                entity.Property(e => e.OrderId)
+                    .HasColumnName("order_id")
+                    .HasComment("预发机主表ID");
+
+                entity.Property(e => e.PosSn)
+                    .HasColumnName("pos_sn")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("机具码")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.ReturnTime)
+                    .HasColumnName("return_time")
+                    .HasColumnType("datetime")
+                    .HasComment("撤回时间");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsMachineAward>(entity =>
+            {
+                entity.ToTable("kxs_machine_award");
+
+                entity.HasComment("机具奖励信息表");
+
+                entity.HasIndex(e => e.MachineId)
+                    .HasName("machine_id");
+
+                entity.HasIndex(e => e.VariationType)
+                    .HasName("change_type");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("ID");
+
+                entity.Property(e => e.Amount)
+                    .HasColumnName("amount")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("奖励金额");
+
+                entity.Property(e => e.AwardType)
+                    .HasColumnName("award_type")
+                    .HasComment("奖励类型 0机具 1商城");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记");
+
+                entity.Property(e => e.MachineId)
+                    .HasColumnName("machine_id")
+                    .HasComment("机具id");
+
+                entity.Property(e => e.PosSn)
+                    .HasColumnName("pos_sn")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("机具编号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserCode)
+                    .HasColumnName("user_code")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("创客编号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasComment("创客id");
+
+                entity.Property(e => e.Username)
+                    .HasColumnName("username")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("创客用户名")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.VariationType)
+                    .HasColumnName("variation_type")
+                    .HasComment("奖励类型");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本号");
+            });
+
+            modelBuilder.Entity<KxsMachineCashOrder>(entity =>
+            {
+                entity.ToTable("kxs_machine_cash_order");
+
+                entity.HasComment("客小爽wifi押金订单关联商品订单表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.CreateBy)
+                    .HasColumnName("create_by")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("添加人")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasColumnType("varchar(1)")
+                    .HasDefaultValueSql("'0'")
+                    .HasComment("删除标记,0未删除,1已删除")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.MachineApplyId)
+                    .HasColumnName("machine_apply_id")
+                    .HasComment("机具申请订单ID");
+
+                entity.Property(e => e.MachineId)
+                    .HasColumnName("machine_id")
+                    .HasComment("机具ID");
+
+                entity.Property(e => e.ShopOrderId)
+                    .HasColumnName("shop_order_id")
+                    .HasComment("商品订单ID");
+
+                entity.Property(e => e.UpdateBy)
+                    .HasColumnName("update_by")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("更新人")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserCode)
+                    .HasColumnName("user_code")
+                    .HasColumnType("varchar(16)")
+                    .HasComment("创客编号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasComment("用户ID");
+
+                entity.Property(e => e.Username)
+                    .HasColumnName("username")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("创客姓名")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsMachineCirculationLog>(entity =>
+            {
+                entity.ToTable("kxs_machine_circulation_log");
+
+                entity.HasComment("客小爽循环机记录表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.MachineId)
+                    .HasColumnName("machine_id")
+                    .HasComment("机具ID");
+
+                entity.Property(e => e.OrderId)
+                    .HasColumnName("order_id")
+                    .HasComment("订单ID");
+
+                entity.Property(e => e.Pid)
+                    .HasColumnName("pid")
+                    .HasComment("上级ID");
+
+                entity.Property(e => e.PidPath)
+                    .HasColumnName("pid_path")
+                    .HasColumnType("varchar(2000)")
+                    .HasDefaultValueSql("'0'")
+                    .HasComment("上级路径")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.SourceSn)
+                    .HasColumnName("source_sn")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("源sn")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasComment("用户ID");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsMachineCutBind>(entity =>
+            {
+                entity.ToTable("kxs_machine_cut_bind");
+
+                entity.HasComment("机具换绑记录表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.BrandId)
+                    .HasColumnName("brand_id")
+                    .HasComment("品牌");
+
+                entity.Property(e => e.CreateBy)
+                    .HasColumnName("create_by")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("操作人")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.CutBrandId)
+                    .HasColumnName("cut_brand_id")
+                    .HasComment("换机后的新品牌");
+
+                entity.Property(e => e.CutPosSn)
+                    .HasColumnName("cut_pos_sn")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("换机后的新sn")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.CutType)
+                    .HasColumnName("cut_type")
+                    .HasComment("类型 0-换绑 1-坏机换新 2-跨品牌换机");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasColumnType("varchar(1)")
+                    .HasDefaultValueSql("'0'")
+                    .HasComment("删除标记,0未删除,1已删除")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.IsNotify)
+                    .HasColumnName("is_notify")
+                    .HasComment("是否通知创客 1通知");
+
+                entity.Property(e => e.OrderSn)
+                    .HasColumnName("order_sn")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("订单号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.OutWhsAddress)
+                    .HasColumnName("out_whs_address")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("出库仓库地址")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.OutWhsId)
+                    .HasColumnName("out_whs_id")
+                    .HasComment("出库仓库ID");
+
+                entity.Property(e => e.OutWhsMobile)
+                    .HasColumnName("out_whs_mobile")
+                    .HasColumnType("varchar(16)")
+                    .HasComment("出库仓库手机号码")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.OutWhsName)
+                    .HasColumnName("out_whs_name")
+                    .HasColumnType("varchar(128)")
+                    .HasComment("出库仓库名称")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.PosSn)
+                    .HasColumnName("pos_sn")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("机具号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnName("remark")
+                    .HasColumnType("varchar(128)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.ToWhsAddress)
+                    .HasColumnName("to_whs_address")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("退回仓库地址")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.ToWhsId)
+                    .HasColumnName("to_whs_id")
+                    .HasComment("退回仓库ID");
+
+                entity.Property(e => e.ToWhsMobile)
+                    .HasColumnName("to_whs_mobile")
+                    .HasColumnType("varchar(16)")
+                    .HasComment("退回仓库联系号码")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.ToWhsName)
+                    .HasColumnName("to_whs_name")
+                    .HasColumnType("varchar(128)")
+                    .HasComment("退回仓库名称")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateBy)
+                    .HasColumnName("update_by")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("操作人")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserCode)
+                    .HasColumnName("user_code")
+                    .HasColumnType("varchar(16)")
+                    .HasComment("用户编号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasComment("用户ID");
+
+                entity.Property(e => e.Username)
+                    .HasColumnName("username")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("用户姓名")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsMachineDeduct>(entity =>
+            {
+                entity.ToTable("kxs_machine_deduct");
+
+                entity.HasComment("机具循环过期已扣款记录表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.BrandId)
+                    .HasColumnName("brand_id")
+                    .HasComment("品牌名称");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.PosSn)
+                    .HasColumnName("pos_sn")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("机具号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnName("remark")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsMachineExpInfo>(entity =>
+            {
+                entity.ToTable("kxs_machine_exp_info");
+
+                entity.HasComment("机具未绑定超时预扣款记录表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.AdvanceId)
+                    .HasColumnName("advance_id")
+                    .HasComment("预扣款ID");
+
+                entity.Property(e => e.CreateBy)
+                    .HasColumnName("create_by")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("添加人")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasColumnType("varchar(1)")
+                    .HasDefaultValueSql("'0'")
+                    .HasComment("删除标记,0未删除,1已删除")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.MachineId)
+                    .HasColumnName("machine_id")
+                    .HasComment("机具ID");
+
+                entity.Property(e => e.UpdateBy)
+                    .HasColumnName("update_by")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("更新人")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasComment("用户ID");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsMachinePledge>(entity =>
+            {
+                entity.ToTable("kxs_machine_pledge");
+
+                entity.HasComment("客小爽押金调整记录表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.AfterPledge)
+                    .HasColumnName("after_pledge")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("调整后押金");
+
+                entity.Property(e => e.BeforePledge)
+                    .HasColumnName("before_pledge")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("调整前押金");
+
+                entity.Property(e => e.BrandId)
+                    .HasColumnName("brand_id")
+                    .HasComment("品牌");
+
+                entity.Property(e => e.CreateBy)
+                    .HasColumnName("create_by")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("操作人")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.PosSn)
+                    .IsRequired()
+                    .HasColumnName("pos_sn")
+                    .HasColumnType("varchar(64)")
+                    .HasDefaultValueSql("'0'")
+                    .HasComment("机具")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnName("remark")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Result)
+                    .HasColumnName("result")
+                    .HasColumnType("varchar(1000)")
+                    .HasComment("三方返回数据")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasComment("用户ID");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsMachineRatio>(entity =>
+            {
+                entity.ToTable("kxs_machine_ratio");
+
+                entity.HasComment("客小爽费率调整记录表");
+
+                entity.HasIndex(e => e.MachineId)
+                    .HasName("machine_id");
+
+                entity.HasIndex(e => e.MerchantId)
+                    .HasName("mch_id");
+
+                entity.HasIndex(e => e.PosSn)
+                    .HasName("pos_sn");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.BeforeRatio)
+                    .HasColumnName("before_ratio")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("调前费率");
+
+                entity.Property(e => e.BrandId)
+                    .HasColumnName("brand_id")
+                    .HasComment("品牌");
+
+                entity.Property(e => e.CreateBy)
+                    .HasColumnName("create_by")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("操作人")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.MachineId)
+                    .HasColumnName("machine_id")
+                    .HasComment("机具ID");
+
+                entity.Property(e => e.MerchantId)
+                    .HasColumnName("merchant_id")
+                    .HasComment("商户ID");
+
+                entity.Property(e => e.PosSn)
+                    .HasColumnName("pos_sn")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("机具ID")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.PosUserId)
+                    .HasColumnName("pos_user_id")
+                    .HasComment("机具所属人用户ID");
+
+                entity.Property(e => e.Ratio)
+                    .HasColumnName("ratio")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("调整费率");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnName("remark")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Result)
+                    .HasColumnName("result")
+                    .HasColumnType("varchar(2000)")
+                    .HasComment("三方返回数据")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasDefaultValueSql("'1'")
+                    .HasComment("状态 -1 调整失败 0审核中 1设置成功");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasComment("用户ID");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsMachineTrack>(entity =>
+            {
+                entity.ToTable("kxs_machine_track");
+
+                entity.HasComment("客小爽机具轨迹记录表");
+
+                entity.HasIndex(e => e.PosSn)
+                    .HasName("pos_sn");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.AfterUserId)
+                    .HasColumnName("after_user_id")
+                    .HasComment("变动后用户ID");
+
+                entity.Property(e => e.AfterWhsId)
+                    .HasColumnName("after_whs_id")
+                    .HasComment("操作后仓库");
+
+                entity.Property(e => e.BeforeUserId)
+                    .HasColumnName("before_user_id")
+                    .HasComment("变动前所属用户ID");
+
+                entity.Property(e => e.BeforeWhsId)
+                    .HasColumnName("before_whs_id")
+                    .HasComment("操作前仓库");
+
+                entity.Property(e => e.BrandId)
+                    .HasColumnName("brand_id")
+                    .HasComment("品牌ID");
+
+                entity.Property(e => e.ChangeType)
+                    .HasColumnName("change_type")
+                    .HasComment("变动方向 0出库 1入库");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.MachineId)
+                    .HasColumnName("machine_id")
+                    .HasComment("机具ID");
+
+                entity.Property(e => e.PartnerId)
+                    .HasColumnName("partner_id")
+                    .HasComment("合伙人ID");
+
+                entity.Property(e => e.PosSn)
+                    .HasColumnName("pos_sn")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("机具号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnName("remark")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.TrackType)
+                    .HasColumnName("track_type")
+                    .HasComment("轨迹类型 0 采购 1 调拨 2 出货 3 退货 4 驳回 5 回仓退款 6 换机出库 7 换机入库");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsMachineTransfer>(entity =>
+            {
+                entity.ToTable("kxs_machine_transfer");
+
+                entity.HasComment("客小爽机具划拨记录表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.BrandId)
+                    .HasColumnName("brand_id")
+                    .HasComment("品牌ID");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.MachineId)
+                    .HasColumnName("machine_id")
+                    .HasComment("机具ID");
+
+                entity.Property(e => e.MachineSn)
+                    .HasColumnName("machine_sn")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("机具号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.MachineType)
+                    .HasColumnName("machine_type")
+                    .HasComment("机具类型 0兑换机 1循环机");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnName("remark")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.SendUserId)
+                    .HasColumnName("send_user_id")
+                    .HasComment("拨出用户ID");
+
+                entity.Property(e => e.ToUserCode)
+                    .HasColumnName("to_user_code")
+                    .HasColumnType("varchar(12)")
+                    .HasComment("拨入用户code")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.ToUserId)
+                    .HasColumnName("to_user_id")
+                    .HasComment("拨入用户ID");
+
+                entity.Property(e => e.ToUserName)
+                    .HasColumnName("to_user_name")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("拨入用户姓名")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.TransferType)
+                    .HasColumnName("transfer_type")
+                    .HasComment("划拨类型 0未绑定划拨");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsMachineUnbind>(entity =>
+            {
+                entity.ToTable("kxs_machine_unbind");
+
+                entity.HasComment("机具解绑记录表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.ApplyNo)
+                    .HasColumnName("apply_no")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("订单号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.BrandId)
+                    .HasColumnName("brand_id")
+                    .HasComment("品牌");
+
+                entity.Property(e => e.CreateBy)
+                    .HasColumnName("create_by")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("操作人")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasColumnType("varchar(1)")
+                    .HasDefaultValueSql("'0'")
+                    .HasComment("删除标记,0未删除,1已删除")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.MchId)
+                    .HasColumnName("mch_id")
+                    .HasComment("商户ID");
+
+                entity.Property(e => e.PosSn)
+                    .HasColumnName("pos_sn")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("机具号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnName("remark")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasComment("用户ID");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsMerchant>(entity =>
+            {
+                entity.ToTable("kxs_merchant");
+
+                entity.HasComment("客小爽商户表");
+
+                entity.HasIndex(e => e.BrandId)
+                    .HasName("query");
+
+                entity.HasIndex(e => e.MachineId)
+                    .HasName("machineId");
+
+                entity.HasIndex(e => e.MerchantName)
+                    .HasName("mch_name");
+
+                entity.HasIndex(e => e.MerchantNo)
+                    .HasName("mch_no");
+
+                entity.HasIndex(e => e.UserId)
+                    .HasName("userId");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.Address)
+                    .HasColumnName("address")
+                    .HasColumnType("varchar(128)")
+                    .HasComment("商户地址")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.BrandId)
+                    .HasColumnName("brand_id")
+                    .HasComment("品牌ID");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.IsMaker)
+                    .HasColumnName("is_maker")
+                    .HasComment("是否商户型创客 0否 1是");
+
+                entity.Property(e => e.MachineId)
+                    .HasColumnName("machine_id")
+                    .HasComment("机具ID");
+
+                entity.Property(e => e.MakerUserId)
+                    .HasColumnName("maker_user_id")
+                    .HasComment("商户型创客的用户ID");
+
+                entity.Property(e => e.MerchantCard)
+                    .HasColumnName("merchant_card")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("身份证号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.MerchantName)
+                    .HasColumnName("merchant_name")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("商户名称")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.MerchantNo)
+                    .HasColumnName("merchant_no")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("商户编号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.MerchantPhone)
+                    .HasColumnName("merchant_phone")
+                    .HasColumnType("varchar(18)")
+                    .HasComment("商户电话")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnName("remark")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.StandardMonths)
+                    .HasColumnName("standard_months")
+                    .HasComment("退押达标月数");
+
+                entity.Property(e => e.StandardStatus)
+                    .HasColumnName("standard_status")
+                    .HasComment("退押达标状态 待处理=0 退还成功=1 退还失败=2 处理中=3 已达标=100 可退还=101");
+
+                entity.Property(e => e.StandardTime)
+                    .HasColumnName("standard_time")
+                    .HasColumnType("datetime")
+                    .HasComment("达标时间");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasDefaultValueSql("'1'")
+                    .HasComment("商户状态 0关闭 1正常 2冻结");
+
+                entity.Property(e => e.TotalAmt)
+                    .HasColumnName("total_amt")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("总交易额");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasComment("所属创客ID");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsMerchantReturn>(entity =>
+            {
+                entity.ToTable("kxs_merchant_return");
+
+                entity.HasComment("商户退押账户信息表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.AliAccount)
+                    .HasColumnName("ali_account")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("支付宝账户")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.BankName)
+                    .HasColumnName("bank_name")
+                    .HasColumnType("varchar(128)")
+                    .HasComment("银行卡名称")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.BankNo)
+                    .HasColumnName("bank_no")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("银行卡号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.CreateBy)
+                    .HasColumnName("create_by")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("操作人")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasColumnType("varchar(1)")
+                    .HasDefaultValueSql("'0'")
+                    .HasComment("删除标记,0未删除,1已删除")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.MchId)
+                    .HasColumnName("mch_id")
+                    .HasComment("商户ID");
+
+                entity.Property(e => e.OrderSn)
+                    .HasColumnName("order_sn")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("订单号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.PayKind)
+                    .HasColumnName("pay_kind")
+                    .HasComment("支付类型 0支付宝 1银行卡");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnName("remark")
+                    .HasColumnType("varchar(2000)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.ReturnAmt)
+                    .HasColumnName("return_amt")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("退款金额");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasComment("退款状态 0未退 1成功 2失败");
+
+                entity.Property(e => e.UpdateBy)
+                    .HasColumnName("update_by")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("操作人")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasComment("机具所属创客ID");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsMerchantTrade>(entity =>
+            {
+                entity.ToTable("kxs_merchant_trade");
+
+                entity.HasComment("商户交易明细");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.BrandId)
+                    .HasColumnName("brand_id")
+                    .HasComment("品牌ID");
+
+                entity.Property(e => e.CardType)
+                    .HasColumnName("card_type")
+                    .HasComment("卡类型 0-贷记卡 1-借记卡");
+
+                entity.Property(e => e.CloudPayFlag)
+                    .HasColumnName("cloud_pay_flag")
+                    .HasComment("是否云闪付 0否 1是");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DebitTopFlag)
+                    .HasColumnName("debit_top_flag")
+                    .HasComment("借记卡封顶交易标志 0未封顶 1封顶");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasColumnType("varchar(1)")
+                    .HasDefaultValueSql("'0'")
+                    .HasComment("删除标记,0未删除,1已删除")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.LvKey)
+                    .HasColumnName("lv_key")
+                    .HasColumnType("varchar(16)")
+                    .HasComment("商户活动类型 字典见对应的值")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.MchId)
+                    .HasColumnName("mch_id")
+                    .HasComment("商户ID");
+
+                entity.Property(e => e.PosSn)
+                    .HasColumnName("pos_sn")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("机具号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.TradeAmt)
+                    .HasColumnName("trade_amt")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("交易金额");
+
+                entity.Property(e => e.TradeNo)
+                    .HasColumnName("trade_no")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("交易流水号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserCode)
+                    .HasColumnName("user_code")
+                    .HasColumnType("varchar(16)")
+                    .HasComment("用户编号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Username)
+                    .HasColumnName("username")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("用户姓名")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsMerchantUser>(entity =>
+            {
+                entity.ToTable("kxs_merchant_user");
+
+                entity.HasComment("商户退押用户实名表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.CreateBy)
+                    .HasColumnName("create_by")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("添加人")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasColumnType("varchar(1)")
+                    .HasDefaultValueSql("'0'")
+                    .HasComment("删除标记,0未删除,1已删除")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.IdCard)
+                    .HasColumnName("id_card")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("身份证")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Phone)
+                    .HasColumnName("phone")
+                    .HasColumnType("varchar(16)")
+                    .HasComment("手机号码")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasComment("0未实名 1已实名");
+
+                entity.Property(e => e.UpdateBy)
+                    .HasColumnName("update_by")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("更新人")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.Username)
+                    .HasColumnName("username")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("姓名")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsShopCate>(entity =>
+            {
+                entity.ToTable("kxs_shop_cate");
+
+                entity.HasComment("商城分类表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.ColId)
+                    .HasColumnName("col_id")
+                    .HasColumnType("varchar(30)")
+                    .HasComment("分类编号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.IconUrl)
+                    .HasColumnName("icon_url")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("图标")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.IsShow)
+                    .HasColumnName("is_show")
+                    .HasComment("是否展示在商城 0否 1是");
+
+                entity.Property(e => e.Level)
+                    .HasColumnName("level")
+                    .HasComment("分类层级");
+
+                entity.Property(e => e.Name)
+                    .HasColumnName("name")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("分类名称")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Pid)
+                    .HasColumnName("pid")
+                    .HasComment("上级ID");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnName("sort")
+                    .HasComment("排序");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasComment("状态 0禁用 1启用");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsShopGoods>(entity =>
+            {
+                entity.ToTable("kxs_shop_goods");
+
+                entity.HasComment("商城商品表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.ColId)
+                    .HasColumnName("col_id")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("分类ID")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.Details)
+                    .HasColumnName("details")
+                    .HasColumnType("longtext")
+                    .HasComment("详情")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.DownTime)
+                    .HasColumnName("down_time")
+                    .HasColumnType("datetime")
+                    .HasComment("下架时间");
+
+                entity.Property(e => e.GoodsName)
+                    .HasColumnName("goods_name")
+                    .HasColumnType("varchar(128)")
+                    .HasComment("商品名称")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.GoodsType)
+                    .HasColumnName("goods_type")
+                    .HasComment("商品类型 0实物商品 1虚拟物品");
+
+                entity.Property(e => e.LimitCount)
+                    .HasColumnName("limit_count")
+                    .HasComment("限购数量");
+
+                entity.Property(e => e.PicUrl)
+                    .HasColumnName("pic_url")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("封面图")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Price)
+                    .HasColumnName("price")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("价格");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnName("sort")
+                    .HasDefaultValueSql("'100'")
+                    .HasComment("排序");
+
+                entity.Property(e => e.SpecList)
+                    .HasColumnName("spec_list")
+                    .HasColumnType("varchar(2000)")
+                    .HasComment("sku属性字段")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.StartByCount)
+                    .HasColumnName("start_by_count")
+                    .HasComment("起购数量");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasComment("状态 0下架 1上架");
+
+                entity.Property(e => e.Subtitle)
+                    .HasColumnName("subtitle")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("子标题")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpTime)
+                    .HasColumnName("up_time")
+                    .HasColumnType("datetime")
+                    .HasComment("上架时间");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsShopGoodsPic>(entity =>
+            {
+                entity.ToTable("kxs_shop_goods_pic");
+
+                entity.HasComment("商城商品图片表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.GoodsId)
+                    .HasColumnName("goods_id")
+                    .HasComment("商品ID");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnName("sort")
+                    .HasComment("排序");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.Url)
+                    .HasColumnName("url")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("图片地址")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsShopGoodsSku>(entity =>
+            {
+                entity.ToTable("kxs_shop_goods_sku");
+
+                entity.HasComment("商城商品SKU表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.GoodId)
+                    .HasColumnName("good_id")
+                    .HasComment("商品ID");
+
+                entity.Property(e => e.Image)
+                    .HasColumnName("image")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("sku图片")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.LimitCount)
+                    .HasColumnName("limit_count")
+                    .HasComment("限购数量");
+
+                entity.Property(e => e.Price)
+                    .HasColumnName("price")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("售价");
+
+                entity.Property(e => e.Sales)
+                    .HasColumnName("sales")
+                    .HasComment("销量");
+
+                entity.Property(e => e.Specifications)
+                    .HasColumnName("specifications")
+                    .HasColumnType("varchar(1023)")
+                    .HasComment("商品规格值列表,采用JSON数组格式")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.StartByCount)
+                    .HasColumnName("start_by_count")
+                    .HasComment("起购数量");
+
+                entity.Property(e => e.StockNum)
+                    .HasColumnName("stock_num")
+                    .HasComment("库存数量");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsShopGoodsSpec>(entity =>
+            {
+                entity.ToTable("kxs_shop_goods_spec");
+
+                entity.HasComment("商城商品SKU记录表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.GoodsId)
+                    .HasColumnName("goods_id")
+                    .HasComment("商品ID");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnName("sort")
+                    .HasComment("排序");
+
+                entity.Property(e => e.Specifications)
+                    .HasColumnName("specifications")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("商品规格名称")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.Value)
+                    .HasColumnName("value")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("商品规格值")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsShopOrder>(entity =>
+            {
+                entity.ToTable("kxs_shop_order");
+
+                entity.HasComment("商城订单表");
+
+                entity.HasIndex(e => new { e.Status, e.UserId })
+                    .HasName("query");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.Address)
+                    .HasColumnName("address")
+                    .HasColumnType("varchar(128)")
+                    .HasComment("收货地址")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Consignee)
+                    .HasColumnName("consignee")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("收货人")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.ErpName)
+                    .HasColumnName("erp_name")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("快递公司")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.ErpSn)
+                    .HasColumnName("erp_sn")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("快递单号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.GetMode)
+                    .HasColumnName("get_mode")
+                    .HasComment("提货方式 0自提 1邮寄");
+
+                entity.Property(e => e.OrderSn)
+                    .HasColumnName("order_sn")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("订单号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.OrderType)
+                    .HasColumnName("order_type")
+                    .HasComment("订单类型 0商城订单 1分仓额度 2小分仓额度 3小盟主订单 4大盟主订单");
+
+                entity.Property(e => e.PayPrice)
+                    .HasColumnName("pay_price")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("支付金额");
+
+                entity.Property(e => e.PayTime)
+                    .HasColumnName("pay_time")
+                    .HasColumnType("datetime")
+                    .HasComment("支付时间");
+
+                entity.Property(e => e.PayType)
+                    .HasColumnName("pay_type")
+                    .HasComment("支付渠道 0余额 1支付宝 2微信 3盟主储蓄金");
+
+                entity.Property(e => e.Phone)
+                    .HasColumnName("phone")
+                    .HasColumnType("varchar(18)")
+                    .HasComment("收货电话")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnName("remark")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8mb4")
+                    .HasCollation("utf8mb4_0900_ai_ci");
+
+                entity.Property(e => e.ReturnPrice)
+                    .HasColumnName("return_price")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("退款金额");
+
+                entity.Property(e => e.ReturnReason)
+                    .HasColumnName("return_reason")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("退货原因")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.ReturnStatus)
+                    .HasColumnName("return_status")
+                    .HasComment("退款状态 0未申请 1已申请 2申请通过 3申请驳回");
+
+                entity.Property(e => e.ReturnTime)
+                    .HasColumnName("return_time")
+                    .HasColumnType("datetime")
+                    .HasComment("申请退款时间");
+
+                entity.Property(e => e.SendTime)
+                    .HasColumnName("send_time")
+                    .HasColumnType("datetime")
+                    .HasComment("发货时间");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasComment("状态 0未支付 1已支付 2已发货 3已完成 4已取消");
+
+                entity.Property(e => e.TopUserId)
+                    .HasColumnName("top_user_id")
+                    .HasComment("顶级创客ID");
+
+                entity.Property(e => e.TotalPrice)
+                    .HasColumnName("total_price")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("订单金额");
+
+                entity.Property(e => e.TradeNo)
+                    .HasColumnName("trade_no")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("交易流水号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateBy)
+                    .HasColumnName("update_by")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("操作人")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasComment("用户ID");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+
+                entity.Property(e => e.WarehouseId)
+                    .HasColumnName("warehouse_id")
+                    .HasComment("自提仓库ID");
+            });
+
+            modelBuilder.Entity<KxsShopOrderInfo>(entity =>
+            {
+                entity.ToTable("kxs_shop_order_info");
+
+                entity.HasComment("商城订单详情表");
+
+                entity.HasIndex(e => e.OrderId)
+                    .HasName("query");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.GoodsId)
+                    .HasColumnName("goods_id")
+                    .HasComment("商品ID");
+
+                entity.Property(e => e.GoodsName)
+                    .HasColumnName("goods_name")
+                    .HasColumnType("varchar(128)")
+                    .HasComment("商品名称")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.GoodsPrice)
+                    .HasColumnName("goods_price")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("商品单价");
+
+                entity.Property(e => e.Number)
+                    .HasColumnName("number")
+                    .HasComment("商品数量");
+
+                entity.Property(e => e.OrderId)
+                    .HasColumnName("order_id")
+                    .HasComment("订单ID");
+
+                entity.Property(e => e.PicUrl)
+                    .HasColumnName("pic_url")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("封面图")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.SkuId)
+                    .HasColumnName("sku_id")
+                    .HasComment("商品skuId");
+
+                entity.Property(e => e.Specifications)
+                    .HasColumnName("specifications")
+                    .HasColumnType("varchar(1023)")
+                    .HasComment("商品货品的规格列表")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsTicket>(entity =>
+            {
+                entity.ToTable("kxs_ticket");
+
+                entity.HasComment("客小爽券码表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.LeaderId)
+                    .HasColumnName("leader_id")
+                    .HasComment("盟主用户ID");
+
+                entity.Property(e => e.OrderId)
+                    .HasColumnName("order_id")
+                    .HasComment("购买订单ID");
+
+                entity.Property(e => e.PartnerId)
+                    .HasColumnName("partner_id")
+                    .HasComment("合伙人用户ID");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasComment("状态 0未使用 1已使用 2已申请冻结");
+
+                entity.Property(e => e.TicketAllotPath)
+                    .HasColumnName("ticket_allot_path")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("机具卷轨迹记录")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.TicketCode)
+                    .HasColumnName("ticket_code")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("券码")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.TicketType)
+                    .HasColumnName("ticket_type")
+                    .HasComment("券码类型 0电签 1大pos");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasComment("用户ID");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsTicketTransfer>(entity =>
+            {
+                entity.ToTable("kxs_ticket_transfer");
+
+                entity.HasComment("客小爽券码划拨记录表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.OrderSn)
+                    .HasColumnName("order_sn")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("订单号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnName("remark")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.SendUserCode)
+                    .HasColumnName("send_user_code")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("拨出用户编码")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.SendUserId)
+                    .HasColumnName("send_user_id")
+                    .HasComment("拨出用户ID");
+
+                entity.Property(e => e.SendUserName)
+                    .HasColumnName("send_user_name")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("拨出用户姓名")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.TicketType)
+                    .HasColumnName("ticket_type")
+                    .HasComment("券码类型 0电签 1大pos");
+
+                entity.Property(e => e.ToUserCode)
+                    .HasColumnName("to_user_code")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("拨入用户编码")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.ToUserId)
+                    .HasColumnName("to_user_id")
+                    .HasComment("拨入用户ID");
+
+                entity.Property(e => e.ToUserName)
+                    .HasColumnName("to_user_name")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("拨入用户姓名")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.TransferNum)
+                    .HasColumnName("transfer_num")
+                    .HasComment("数量");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsTicketTransferInfo>(entity =>
+            {
+                entity.ToTable("kxs_ticket_transfer_info");
+
+                entity.HasComment("客小爽券码划拨记录明细表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.OrderSn)
+                    .HasColumnName("order_sn")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("划拨订单号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.TicketCode)
+                    .HasColumnName("ticket_code")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("券码")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.TicketId)
+                    .HasColumnName("ticket_id")
+                    .HasComment("券码ID");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<KxsTicketUpgrade>(entity =>
+            {
+                entity.ToTable("kxs_ticket_upgrade");
+
+                entity.HasComment("券码升级记录表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasColumnType("varchar(1)")
+                    .HasDefaultValueSql("'0'")
+                    .HasComment("删除标记,0未删除,1已删除")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnName("remark")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.SourceCount)
+                    .HasColumnName("source_count")
+                    .HasComment("升级前电签券数量");
+
+                entity.Property(e => e.SourceTickets)
+                    .HasColumnName("source_tickets")
+                    .HasColumnType("varchar(2056)")
+                    .HasComment("升级前的电签券")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpCount)
+                    .HasColumnName("up_count")
+                    .HasComment("升级数量");
+
+                entity.Property(e => e.UpTickets)
+                    .HasColumnName("up_tickets")
+                    .HasColumnType("varchar(1000)")
+                    .HasComment("升级后的券 逗号隔开")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserCode)
+                    .HasColumnName("user_code")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("创客编号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasComment("用户ID");
+
+                entity.Property(e => e.Username)
+                    .HasColumnName("username")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("创客姓名")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
+            modelBuilder.Entity<UndoLog>(entity =>
+            {
+                entity.HasNoKey();
+
+                entity.ToTable("undo_log");
+
+                entity.HasComment("AT transaction mode undo table");
+
+                entity.HasIndex(e => e.LogCreated)
+                    .HasName("ix_log_created");
+
+                entity.HasIndex(e => new { e.Xid, e.BranchId })
+                    .HasName("ux_undo_log")
+                    .IsUnique();
+
+                entity.Property(e => e.BranchId)
+                    .HasColumnName("branch_id")
+                    .HasComment("branch transaction id");
+
+                entity.Property(e => e.Context)
+                    .IsRequired()
+                    .HasColumnName("context")
+                    .HasColumnType("varchar(128)")
+                    .HasComment("undo_log context,such as serialization")
+                    .HasCharSet("utf8mb4")
+                    .HasCollation("utf8mb4_0900_ai_ci");
+
+                entity.Property(e => e.LogCreated)
+                    .HasColumnName("log_created")
+                    .HasComment("create datetime");
+
+                entity.Property(e => e.LogModified)
+                    .HasColumnName("log_modified")
+                    .HasComment("modify datetime");
+
+                entity.Property(e => e.LogStatus)
+                    .HasColumnName("log_status")
+                    .HasComment("0:normal status,1:defense status");
+
+                entity.Property(e => e.RollbackInfo)
+                    .IsRequired()
+                    .HasColumnName("rollback_info")
+                    .HasComment("rollback info");
+
+                entity.Property(e => e.Xid)
+                    .IsRequired()
+                    .HasColumnName("xid")
+                    .HasColumnType("varchar(128)")
+                    .HasComment("global transaction id")
+                    .HasCharSet("utf8mb4")
+                    .HasCollation("utf8mb4_0900_ai_ci");
+            });
+
+            OnModelCreatingPartial(modelBuilder);
+        }
+
+        partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
+    }
+}

+ 25 - 0
PxcModels/UserAmountSummaryNewAfter.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class UserAmountSummaryNewAfter
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int PayMode { get; set; }
+        public decimal TotalAmount { get; set; }
+        public string TradeMonth { get; set; }
+        public string TradeDate { get; set; }
+        public int UserId { get; set; }
+        public int TradeCount { get; set; }
+        public int IsAct { get; set; }
+    }
+}

+ 25 - 0
PxcModels/UserAmountSummaryNewBefore.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class UserAmountSummaryNewBefore
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int PayMode { get; set; }
+        public decimal TotalAmount { get; set; }
+        public string TradeMonth { get; set; }
+        public string TradeDate { get; set; }
+        public int UserId { get; set; }
+        public int TradeCount { get; set; }
+        public int IsAct { get; set; }
+    }
+}

+ 25 - 0
PxcModels/UserAmountSummaryOldAfter.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class UserAmountSummaryOldAfter
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int PayMode { get; set; }
+        public decimal TotalAmount { get; set; }
+        public string TradeMonth { get; set; }
+        public string TradeDate { get; set; }
+        public int UserId { get; set; }
+        public int TradeCount { get; set; }
+        public int IsAct { get; set; }
+    }
+}

+ 25 - 0
PxcModels/UserAmountSummaryOldBefore.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class UserAmountSummaryOldBefore
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int PayMode { get; set; }
+        public decimal TotalAmount { get; set; }
+        public string TradeMonth { get; set; }
+        public string TradeDate { get; set; }
+        public int UserId { get; set; }
+        public int TradeCount { get; set; }
+        public int IsAct { get; set; }
+    }
+}

+ 232 - 0
PxcModels/WebCMSEntities.cs

@@ -245,6 +245,10 @@ namespace MySystem.PxcModels
         public virtual DbSet<UserAmountSummary> UserAmountSummary { get; set; }
         public virtual DbSet<UserAmountSummaryAfter> UserAmountSummaryAfter { get; set; }
         public virtual DbSet<UserAmountSummaryBefore> UserAmountSummaryBefore { get; set; }
+        public virtual DbSet<UserAmountSummaryNewAfter> UserAmountSummaryNewAfter { get; set; }
+        public virtual DbSet<UserAmountSummaryNewBefore> UserAmountSummaryNewBefore { get; set; }
+        public virtual DbSet<UserAmountSummaryOldAfter> UserAmountSummaryOldAfter { get; set; }
+        public virtual DbSet<UserAmountSummaryOldBefore> UserAmountSummaryOldBefore { get; set; }
         public virtual DbSet<UserAuthRecord> UserAuthRecord { get; set; }
         public virtual DbSet<UserBack> UserBack { get; set; }
         public virtual DbSet<UserBackKind> UserBackKind { get; set; }
@@ -17082,6 +17086,234 @@ namespace MySystem.PxcModels
                 entity.Property(e => e.UserId).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<UserAmountSummaryNewAfter>(entity =>
+            {
+                entity.HasIndex(e => new { e.UserId, e.IsAct, e.TradeMonth, e.TradeDate, e.SeoTitle })
+                    .HasName("UserAmountSummaryIndex");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.IsAct)
+                    .HasColumnType("int(11)")
+                    .HasComment("是否活动");
+
+                entity.Property(e => e.PayMode).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.TradeCount)
+                    .HasColumnType("int(11)")
+                    .HasComment("交易笔数");
+
+                entity.Property(e => e.TradeDate)
+                    .HasColumnType("varchar(8)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TradeMonth)
+                    .HasColumnType("varchar(6)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<UserAmountSummaryNewBefore>(entity =>
+            {
+                entity.HasIndex(e => new { e.UserId, e.IsAct, e.TradeMonth, e.TradeDate, e.SeoTitle })
+                    .HasName("UserAmountSummaryIndex");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.IsAct)
+                    .HasColumnType("int(11)")
+                    .HasComment("是否活动");
+
+                entity.Property(e => e.PayMode).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.TradeCount)
+                    .HasColumnType("int(11)")
+                    .HasComment("交易笔数");
+
+                entity.Property(e => e.TradeDate)
+                    .HasColumnType("varchar(8)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TradeMonth)
+                    .HasColumnType("varchar(6)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<UserAmountSummaryOldAfter>(entity =>
+            {
+                entity.HasIndex(e => new { e.UserId, e.IsAct, e.TradeMonth, e.TradeDate, e.SeoTitle })
+                    .HasName("UserAmountSummaryIndex");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.IsAct)
+                    .HasColumnType("int(11)")
+                    .HasComment("是否活动");
+
+                entity.Property(e => e.PayMode).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.TradeCount)
+                    .HasColumnType("int(11)")
+                    .HasComment("交易笔数");
+
+                entity.Property(e => e.TradeDate)
+                    .HasColumnType("varchar(8)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TradeMonth)
+                    .HasColumnType("varchar(6)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<UserAmountSummaryOldBefore>(entity =>
+            {
+                entity.HasIndex(e => new { e.UserId, e.IsAct, e.TradeMonth, e.TradeDate, e.SeoTitle })
+                    .HasName("UserAmountSummaryIndex");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.IsAct)
+                    .HasColumnType("int(11)")
+                    .HasComment("是否活动");
+
+                entity.Property(e => e.PayMode).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.TradeCount)
+                    .HasColumnType("int(11)")
+                    .HasComment("交易笔数");
+
+                entity.Property(e => e.TradeDate)
+                    .HasColumnType("varchar(8)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TradeMonth)
+                    .HasColumnType("varchar(6)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
             modelBuilder.Entity<UserAuthRecord>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");

+ 22 - 0
PxcModels2/HdDepositTmp.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels2
+{
+    public partial class HdDepositTmp
+    {
+        public string SnNo { get; set; }
+        public string MerKind { get; set; }
+        public string PassDate { get; set; }
+        public string MerName { get; set; }
+        public string SendMan { get; set; }
+        public string PrizeDate { get; set; }
+        public decimal PrizeAmount { get; set; }
+        public decimal DepositAmount { get; set; }
+        public string ActDate { get; set; }
+        public string DeviceKind { get; set; }
+        public string MerNo { get; set; }
+        public int Status { get; set; }
+        public string DepositActCode { get; set; }
+    }
+}

+ 20 - 0
PxcModels2/HdOrderTmp.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels2
+{
+    public partial class HdOrderTmp
+    {
+        public string OrderNo { get; set; }
+        public string SettleDuration { get; set; }
+        public string TradeTime { get; set; }
+        public decimal TradeFee { get; set; }
+        public decimal TradeAmount { get; set; }
+        public string TradeType { get; set; }
+        public string PayMode { get; set; }
+        public string DeviceKind { get; set; }
+        public string SnNo { get; set; }
+        public string MerNo { get; set; }
+        public int Status { get; set; }
+    }
+}

+ 12 - 0
PxcModels2/HdQrCodeTmp.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels2
+{
+    public partial class HdQrCodeTmp
+    {
+        public string SnNo { get; set; }
+        public string MerNo { get; set; }
+        public int Status { get; set; }
+    }
+}

+ 3 - 0
PxcModels2/MerchantAddInfo.cs

@@ -151,5 +151,8 @@ namespace MySystem.PxcModels2
         public int PlaceType { get; set; }
         public int BrandId { get; set; }
         public string CybMakerCode { get; set; }
+        public string FeeRate { get; set; }
+        public int ParentId { get; set; }
+        public string AgentName { get; set; }
     }
 }

+ 19 - 0
PxcModels2/MerchantFeeRecord.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels2
+{
+    public partial class MerchantFeeRecord
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SettleFee { get; set; }
+        public int MerchantId { get; set; }
+        public int UserId { get; set; }
+        public string Remark { get; set; }
+    }
+}

+ 1 - 0
PxcModels2/MerchantInfo.cs

@@ -57,5 +57,6 @@ namespace MySystem.PxcModels2
         public decimal Longitude { get; set; }
         public int BrandId { get; set; }
         public string CybMakerCode { get; set; }
+        public int ParentId { get; set; }
     }
 }

+ 25 - 0
PxcModels2/UserAmountSummaryNewAfter.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels2
+{
+    public partial class UserAmountSummaryNewAfter
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int PayMode { get; set; }
+        public decimal TotalAmount { get; set; }
+        public string TradeMonth { get; set; }
+        public string TradeDate { get; set; }
+        public int UserId { get; set; }
+        public int TradeCount { get; set; }
+        public int IsAct { get; set; }
+    }
+}

+ 25 - 0
PxcModels2/UserAmountSummaryNewBefore.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels2
+{
+    public partial class UserAmountSummaryNewBefore
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int PayMode { get; set; }
+        public decimal TotalAmount { get; set; }
+        public string TradeMonth { get; set; }
+        public string TradeDate { get; set; }
+        public int UserId { get; set; }
+        public int TradeCount { get; set; }
+        public int IsAct { get; set; }
+    }
+}

+ 25 - 0
PxcModels2/UserAmountSummaryOldAfter.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels2
+{
+    public partial class UserAmountSummaryOldAfter
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int PayMode { get; set; }
+        public decimal TotalAmount { get; set; }
+        public string TradeMonth { get; set; }
+        public string TradeDate { get; set; }
+        public int UserId { get; set; }
+        public int TradeCount { get; set; }
+        public int IsAct { get; set; }
+    }
+}

+ 25 - 0
PxcModels2/UserAmountSummaryOldBefore.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels2
+{
+    public partial class UserAmountSummaryOldBefore
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int PayMode { get; set; }
+        public decimal TotalAmount { get; set; }
+        public string TradeMonth { get; set; }
+        public string TradeDate { get; set; }
+        public int UserId { get; set; }
+        public int TradeCount { get; set; }
+        public int IsAct { get; set; }
+    }
+}

+ 487 - 3
PxcModels2/WebCMSEntities.cs

@@ -58,6 +58,9 @@ namespace MySystem.PxcModels2
         public virtual DbSet<FluxProfitDetail> FluxProfitDetail { get; set; }
         public virtual DbSet<FluxProfitSummary> FluxProfitSummary { get; set; }
         public virtual DbSet<HaoDaAreaCode> HaoDaAreaCode { get; set; }
+        public virtual DbSet<HdDepositTmp> HdDepositTmp { get; set; }
+        public virtual DbSet<HdOrderTmp> HdOrderTmp { get; set; }
+        public virtual DbSet<HdQrCodeTmp> HdQrCodeTmp { get; set; }
         public virtual DbSet<HdRefundOrderNos> HdRefundOrderNos { get; set; }
         public virtual DbSet<HdRefundRecord> HdRefundRecord { get; set; }
         public virtual DbSet<HelpProfitAccountRecord> HelpProfitAccountRecord { get; set; }
@@ -104,6 +107,7 @@ namespace MySystem.PxcModels2
         public virtual DbSet<MerchantDepositReturns> MerchantDepositReturns { get; set; }
         public virtual DbSet<MerchantDepositSet> MerchantDepositSet { get; set; }
         public virtual DbSet<MerchantDiviSummay> MerchantDiviSummay { get; set; }
+        public virtual DbSet<MerchantFeeRecord> MerchantFeeRecord { get; set; }
         public virtual DbSet<MerchantForCode> MerchantForCode { get; set; }
         public virtual DbSet<MerchantForMobile> MerchantForMobile { get; set; }
         public virtual DbSet<MerchantForName> MerchantForName { get; set; }
@@ -246,6 +250,10 @@ namespace MySystem.PxcModels2
         public virtual DbSet<UserAmountSummary> UserAmountSummary { get; set; }
         public virtual DbSet<UserAmountSummaryAfter> UserAmountSummaryAfter { get; set; }
         public virtual DbSet<UserAmountSummaryBefore> UserAmountSummaryBefore { get; set; }
+        public virtual DbSet<UserAmountSummaryNewAfter> UserAmountSummaryNewAfter { get; set; }
+        public virtual DbSet<UserAmountSummaryNewBefore> UserAmountSummaryNewBefore { get; set; }
+        public virtual DbSet<UserAmountSummaryOldAfter> UserAmountSummaryOldAfter { get; set; }
+        public virtual DbSet<UserAmountSummaryOldBefore> UserAmountSummaryOldBefore { get; set; }
         public virtual DbSet<UserAuthRecord> UserAuthRecord { get; set; }
         public virtual DbSet<UserBack> UserBack { get; set; }
         public virtual DbSet<UserBackKind> UserBackKind { get; set; }
@@ -3389,6 +3397,178 @@ namespace MySystem.PxcModels2
                     .HasCollation("utf8_general_ci");
             });
 
+            modelBuilder.Entity<HdDepositTmp>(entity =>
+            {
+                entity.HasKey(e => e.SnNo)
+                    .HasName("PRIMARY");
+
+                entity.HasComment("好哒押金临时表");
+
+                entity.Property(e => e.SnNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("设备SN")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ActDate)
+                    .HasColumnType("varchar(20)")
+                    .HasComment("激活时间")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.DepositActCode)
+                    .HasColumnType("varchar(20)")
+                    .HasComment("押金活动编号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.DepositAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("押金金额");
+
+                entity.Property(e => e.DeviceKind)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("设备型号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerKind)
+                    .HasColumnType("varchar(20)")
+                    .HasComment("商户类型")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerName)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("商户名称")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("商户编号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PassDate)
+                    .HasColumnType("varchar(20)")
+                    .HasComment("审核通过日期")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PrizeAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("奖励金额");
+
+                entity.Property(e => e.PrizeDate)
+                    .HasColumnType("varchar(20)")
+                    .HasComment("奖励发放时间")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SendMan)
+                    .HasColumnType("varchar(20)")
+                    .HasComment("发放人姓名")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Status)
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+            });
+
+            modelBuilder.Entity<HdOrderTmp>(entity =>
+            {
+                entity.HasKey(e => e.OrderNo)
+                    .HasName("PRIMARY");
+
+                entity.HasComment("好哒订单临时表");
+
+                entity.Property(e => e.OrderNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("订单号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.DeviceKind)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("终端类型")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("商户号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PayMode)
+                    .HasColumnType("varchar(20)")
+                    .HasComment("支付方式")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SettleDuration)
+                    .HasColumnType("varchar(10)")
+                    .HasComment("结算周期")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SnNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("设备号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Status)
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.TradeAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("交易金额");
+
+                entity.Property(e => e.TradeFee)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("交易手续费");
+
+                entity.Property(e => e.TradeTime)
+                    .HasColumnType("varchar(20)")
+                    .HasComment("交易时间")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TradeType)
+                    .HasColumnType("varchar(20)")
+                    .HasComment("交易类型")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+            });
+
+            modelBuilder.Entity<HdQrCodeTmp>(entity =>
+            {
+                entity.HasKey(e => new { e.SnNo, e.MerNo })
+                    .HasName("PRIMARY");
+
+                entity.HasComment("好哒订单临时表");
+
+                entity.Property(e => e.SnNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("设备号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("商户号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Status)
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+            });
+
             modelBuilder.Entity<HdRefundOrderNos>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
@@ -5539,6 +5719,12 @@ namespace MySystem.PxcModels2
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.AgentName)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("好哒机构")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.AgentProtocol)
                     .HasColumnName("agentProtocol")
                     .HasColumnType("varchar(200)")
@@ -5621,7 +5807,7 @@ namespace MySystem.PxcModels2
                     .HasCollation("utf8_general_ci");
 
                 entity.Property(e => e.BankAddressCode)
-                    .HasColumnType("varchar(20)")
+                    .HasColumnType("varchar(200)")
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
@@ -5770,6 +5956,12 @@ namespace MySystem.PxcModels2
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.FeeRate)
+                    .HasColumnType("varchar(20)")
+                    .HasComment("费率")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.HdBindWeChat)
                     .HasColumnType("bit(1)")
                     .HasDefaultValueSql("b'0'")
@@ -5792,8 +5984,8 @@ namespace MySystem.PxcModels2
 
                 entity.Property(e => e.IdCardAddress)
                     .HasColumnType("varchar(50)")
-                    .HasCharSet("utf8")
-                    .HasCollation("utf8_general_ci");
+                    .HasCharSet("utf8mb4")
+                    .HasCollation("utf8mb4_unicode_ci");
 
                 entity.Property(e => e.IdCardCopy)
                     .HasColumnType("varchar(200)")
@@ -5982,6 +6174,10 @@ namespace MySystem.PxcModels2
                     .HasColumnType("bit(1)")
                     .HasDefaultValueSql("b'0'");
 
+                entity.Property(e => e.ParentId)
+                    .HasColumnType("int(11)")
+                    .HasComment("父级ID");
+
                 entity.Property(e => e.PeriodBegin).HasColumnType("datetime");
 
                 entity.Property(e => e.PeriodEnd).HasColumnType("datetime");
@@ -7155,6 +7351,53 @@ namespace MySystem.PxcModels2
                     .HasComment("版本号");
             });
 
+            modelBuilder.Entity<MerchantFeeRecord>(entity =>
+            {
+                entity.HasComment("费率设置记录");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.MerchantId)
+                    .HasColumnType("int(11)")
+                    .HasComment("商户ID");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("mediumtext")
+                    .HasComment("备注")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SettleFee)
+                    .HasColumnType("varchar(20)")
+                    .HasComment("费率值")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort)
+                    .HasColumnType("int(11)")
+                    .HasComment("排序序号");
+
+                entity.Property(e => e.Status)
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("修改时间");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnType("int(11)")
+                    .HasComment("创客ID");
+
+                entity.Property(e => e.Version)
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
             modelBuilder.Entity<MerchantForCode>(entity =>
             {
                 entity.HasKey(e => e.Code)
@@ -7313,6 +7556,10 @@ namespace MySystem.PxcModels2
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.ParentId)
+                    .HasColumnType("int(11)")
+                    .HasComment("父级ID");
+
                 entity.Property(e => e.ParentUserNav)
                     .HasColumnType("varchar(500)")
                     .HasCharSet("utf8")
@@ -17029,6 +17276,9 @@ namespace MySystem.PxcModels2
 
             modelBuilder.Entity<UserAmountSummary>(entity =>
             {
+                entity.HasIndex(e => new { e.UserId, e.IsAct, e.TradeMonth, e.TradeDate, e.PayMode, e.SeoTitle, e.Sort })
+                    .HasName("UserAmountSummaryIndex");
+
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
                 entity.Property(e => e.CreateDate).HasColumnType("datetime");
@@ -17083,6 +17333,9 @@ namespace MySystem.PxcModels2
 
             modelBuilder.Entity<UserAmountSummaryAfter>(entity =>
             {
+                entity.HasIndex(e => new { e.UserId, e.IsAct, e.TradeMonth, e.TradeDate, e.PayMode, e.SeoTitle, e.Sort })
+                    .HasName("UserAmountSummaryAfterIndex");
+
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
                 entity.Property(e => e.CreateDate).HasColumnType("datetime");
@@ -17137,6 +17390,237 @@ namespace MySystem.PxcModels2
 
             modelBuilder.Entity<UserAmountSummaryBefore>(entity =>
             {
+                entity.HasIndex(e => new { e.UserId, e.IsAct, e.TradeMonth, e.TradeDate, e.PayMode, e.SeoTitle, e.Sort })
+                    .HasName("UserAmountSummaryBeforeIndex");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.IsAct)
+                    .HasColumnType("int(11)")
+                    .HasComment("是否活动");
+
+                entity.Property(e => e.PayMode).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.TradeCount)
+                    .HasColumnType("int(11)")
+                    .HasComment("交易笔数");
+
+                entity.Property(e => e.TradeDate)
+                    .HasColumnType("varchar(8)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TradeMonth)
+                    .HasColumnType("varchar(6)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<UserAmountSummaryNewAfter>(entity =>
+            {
+                entity.HasIndex(e => new { e.UserId, e.IsAct, e.TradeMonth, e.TradeDate, e.PayMode, e.SeoTitle, e.Sort })
+                    .HasName("UserAmountSummaryAfterIndex");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.IsAct)
+                    .HasColumnType("int(11)")
+                    .HasComment("是否活动");
+
+                entity.Property(e => e.PayMode).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.TradeCount)
+                    .HasColumnType("int(11)")
+                    .HasComment("交易笔数");
+
+                entity.Property(e => e.TradeDate)
+                    .HasColumnType("varchar(8)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TradeMonth)
+                    .HasColumnType("varchar(6)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<UserAmountSummaryNewBefore>(entity =>
+            {
+                entity.HasIndex(e => new { e.UserId, e.IsAct, e.TradeMonth, e.TradeDate, e.PayMode, e.SeoTitle, e.Sort })
+                    .HasName("UserAmountSummaryBeforeIndex");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.IsAct)
+                    .HasColumnType("int(11)")
+                    .HasComment("是否活动");
+
+                entity.Property(e => e.PayMode).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.TradeCount)
+                    .HasColumnType("int(11)")
+                    .HasComment("交易笔数");
+
+                entity.Property(e => e.TradeDate)
+                    .HasColumnType("varchar(8)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TradeMonth)
+                    .HasColumnType("varchar(6)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<UserAmountSummaryOldAfter>(entity =>
+            {
+                entity.HasIndex(e => new { e.UserId, e.IsAct, e.TradeMonth, e.TradeDate, e.PayMode, e.SeoTitle, e.Sort })
+                    .HasName("UserAmountSummaryAfterIndex");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.IsAct)
+                    .HasColumnType("int(11)")
+                    .HasComment("是否活动");
+
+                entity.Property(e => e.PayMode).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.SeoDescription)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoKeyword)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SeoTitle)
+                    .HasColumnType("varchar(100)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.TradeCount)
+                    .HasColumnType("int(11)")
+                    .HasComment("交易笔数");
+
+                entity.Property(e => e.TradeDate)
+                    .HasColumnType("varchar(8)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TradeMonth)
+                    .HasColumnType("varchar(6)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<UserAmountSummaryOldBefore>(entity =>
+            {
+                entity.HasIndex(e => new { e.UserId, e.IsAct, e.TradeMonth, e.TradeDate, e.PayMode, e.SeoTitle, e.Sort })
+                    .HasName("UserAmountSummaryBeforeIndex");
+
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
                 entity.Property(e => e.CreateDate).HasColumnType("datetime");

+ 2 - 0
Startup.cs

@@ -115,6 +115,7 @@ namespace MySystem
             //直联
             StatService.Instance.Start(); //实时统计交易额
             StatGdService.Instance.Start(); //实时统计归档交易额
+            StatGdNewService.Instance.Start(); //实时统计归档交易额
             StatResetService.Instance.StartReset(); //重置交易额
             StatService.Instance.StartPosActNum(); //实时统计激活数
             StatNewService.Instance.StartMer(); //实时统计商户交易额
@@ -125,6 +126,7 @@ namespace MySystem
             StatNew2.Instance.Start(); //实时统计交易额
             StatNew2.Instance.StartReset(); //实时统计交易额
             StatGdService2.Instance.Start(); //实时统计归档交易额
+            StatGdNewService2.Instance.Start(); //实时统计归档交易额
             StatResetService2.Instance.StartReset(); //重置交易额
             StatService2.Instance.StartPosActNum(); //实时统计激活数            
             StatNewService2.Instance.StartMer(); //实时统计商户交易额

+ 1 - 0
appsettings.Development.json

@@ -22,6 +22,7 @@
     "SqlConnStr2": "server=47.109.31.237;port=3306;user=QrCodePlateMainServer;password=ll4DFaALMu9YIooM;database=QrCodePlateMainServer2;charset=utf8;",
     "StatSqlConnStr": "server=47.109.31.237;port=3306;user=QrCodePlateMainServer;password=ll4DFaALMu9YIooM;database=QrCodePlateStatServer;charset=utf8;",
     "StatSqlConnStr2": "server=47.109.31.237;port=3306;user=QrCodePlateMainServer;password=ll4DFaALMu9YIooM;database=QrCodePlateStatServer2;charset=utf8;",
+    "KxsProductSqlConnStr": "server=47.109.61.191;port=3306;user=root;password=HDlNs1ZpG5iR9D9I;database=kxs_product;charset=utf8;",
     "RedisConnStr": "47.109.31.237:6379,password=klm@redis,DefaultDatabase=5,poolsize=500,preheat=50,asyncPipeline=true",
     "IOSAppVersion": "1.0.0",
     "AndroidAppVersion": "1.0.0",