Parcourir la source

修复实时监听待扣款记录,并扣费队列

lcl il y a 2 ans
Parent
commit
c0217051a3

BIN
.DS_Store


BIN
AppStart/.DS_Store


BIN
AppStart/Helper/.DS_Store


+ 123 - 0
AppStart/Helper/InstallmentDeductionService.cs

@@ -0,0 +1,123 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Threading;
+using MySystem.Models;
+using Library;
+
+namespace MySystem
+{
+    /// <summary>
+    /// 分期扣款(每月20号执行)
+    /// </summary>
+    public class InstallmentDeductionService
+    {
+        public readonly static InstallmentDeductionService Instance = new InstallmentDeductionService();
+        private InstallmentDeductionService()
+        { }
+
+        public void Start()
+        {
+            Thread th = new Thread(doSomething);
+            th.IsBackground = true;
+            th.Start();
+        }
+
+        public void doSomething()
+        {
+            while (true)
+            {
+                if (DateTime.Now.Day == 20 && DateTime.Now.Hour < 12)
+                {
+                    try
+                    {
+                        string check = function.ReadInstance("/InstallmentDeduction/check" + DateTime.Now.ToString("yyyy-MM-20") + ".txt");
+                        if (string.IsNullOrEmpty(check))
+                        {
+                            function.WritePage("/InstallmentDeduction/", "check" + DateTime.Now.ToString("yyyy-MM-20") + ".txt", DateTime.Now.ToString("HH:mm:ss"));
+                            WebCMSEntities db = new WebCMSEntities();
+                            var startdate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-20 00:00:00"));
+                            var enddate = startdate.AddDays(1);
+                            // var info = db.ToChargeBackRecordSub.Where(m => m.Status == 0 && m.StartDate >= startdate && m.StartDate < enddate).ToList();//分期扣款记录明细
+                            var info = db.ToChargeByStage.Where(m => m.Status == 0).ToList();//分期扣款记录
+                            foreach (var item in info)
+                            {
+                                var toChargeBackRecordSub = db.ToChargeBackRecordSub.FirstOrDefault(m => m.Status == 0 && m.ParentId == item.Id && m.StartDate >= startdate && m.StartDate < enddate) ?? new ToChargeBackRecordSub();
+                                if (toChargeBackRecordSub.Id > 0)
+                                {
+                                    var userAccount = db.UserAccount.FirstOrDefault(m => m.Id == item.UserId);
+                                    if (userAccount == null)
+                                    {
+                                        userAccount = db.UserAccount.Add(new UserAccount()
+                                        {
+                                            Id = item.UserId,
+                                            UserId = item.UserId,
+                                        }).Entity;
+                                        db.SaveChanges();
+                                    }
+                                    toChargeBackRecordSub.Status = 2;
+                                    userAccount.ToChargeAmount += toChargeBackRecordSub.ChargeAmount;//增加预扣款
+                                    var toChargeBackRecord = db.ToChargeBackRecord.Add(new ToChargeBackRecord
+                                    {
+                                        CreateDate = DateTime.Now,
+                                        Sort = toChargeBackRecordSub.Id,
+                                        UserId = item.UserId,
+                                        ChargeAmount = toChargeBackRecordSub.ChargeAmount,
+                                        ChargeType = 2,//分期预扣款
+                                        Remark = toChargeBackRecordSub.Remark,
+
+                                    }).Entity;
+                                }
+
+                                // //只能存在一笔分期扣款记录(先前有的但是余额不够未扣除的则不添加新的)
+                                // var checks = db.ToChargeBackRecord.Any(m => m.Sort > 0 && (m.Status == 0 || m.Status == 3) && m.ChargeType == 2 && m.UserId == item.UserId);
+                                // if (!checks)
+                                // {
+                                //     string checkAdd = RedisDbconn.Instance.Get<string>("InstallmentDeductionAddRecord:" + item.UserId);
+                                //     if (string.IsNullOrEmpty(check))
+                                //     {
+                                //         var toChargeBackRecordSub = db.ToChargeBackRecordSub.FirstOrDefault(m => m.Status == 0 && m.ParentId == item.Id && m.StartDate >= startdate && m.StartDate < enddate) ?? new ToChargeBackRecordSub();
+                                //         if (toChargeBackRecordSub.Id > 0)
+                                //         {
+                                //             var userAccount = db.UserAccount.FirstOrDefault(m => m.Id == item.UserId);
+                                //             if (userAccount == null)
+                                //             {
+                                //                 userAccount = db.UserAccount.Add(new UserAccount()
+                                //                 {
+                                //                     Id = item.UserId,
+                                //                     UserId = item.UserId,
+                                //                 }).Entity;
+                                //                 db.SaveChanges();
+                                //             }
+                                //             userAccount.ToChargeAmount += toChargeBackRecordSub.ChargeAmount;//增加预扣款
+                                //             var toChargeBackRecord = db.ToChargeBackRecord.Add(new ToChargeBackRecord
+                                //             {
+                                //                 CreateDate = DateTime.Now,
+                                //                 Sort = toChargeBackRecordSub.Id,
+                                //                 UserId = item.UserId,
+                                //                 ChargeAmount = toChargeBackRecordSub.ChargeAmount,
+                                //                 ChargeType = 2,//分期预扣款
+                                //                 Remark = "分期预扣款",
+
+                                //             }).Entity;
+                                //         }
+                                //     }
+                                //     RedisDbconn.Instance.Set("InstallmentDeductionAddRecord:" + item.UserId, "wait");
+                                //     RedisDbconn.Instance.SetExpire("InstallmentDeductionAddRecord:" + item.UserId, 300);
+                                // }
+                            }
+                            db.SaveChanges();
+
+                        }
+                    }
+                    catch (Exception ex)
+                    {
+                        function.WriteLog(DateTime.Now.ToString() + ":" + ex.ToString(), "执行分期扣费异常");
+                    }
+                }
+                Thread.Sleep(1000);
+            }
+        }
+    }
+}

+ 39 - 7
AppStart/Helper/TimeOutPosChargeService.cs

@@ -108,7 +108,7 @@ namespace MySystem
 
         public void StartDoChargeAmountReady()
         {
-            while(true)
+            while (true)
             {
                 WebCMSEntities db = new WebCMSEntities();
                 DoChargeAmount(db);
@@ -126,10 +126,10 @@ namespace MySystem
 
         public void ListenChargeAmountReady()
         {
-            while(true)
+            while (true)
             {
                 string content = RedisDbconn.Instance.RPop<string>("DoChargeAmountQueue");
-                if(!string.IsNullOrEmpty(content))
+                if (!string.IsNullOrEmpty(content))
                 {
                     WebCMSEntities db = new WebCMSEntities();
                     DoChargeAmount(db, int.Parse(function.CheckInt(content)));
@@ -141,7 +141,7 @@ namespace MySystem
         public void DoChargeAmount(WebCMSEntities db, int UserId = 0)
         {
             IQueryable<ToChargeBackRecord> list = db.ToChargeBackRecord.Where(m => m.Status == 0);//过期机具扣费记录
-            if(UserId > 0)
+            if (UserId > 0)
             {
                 list = list.Where(m => m.UserId == UserId);
             }
@@ -150,8 +150,28 @@ namespace MySystem
             {
                 var userAccount = db.UserAccount.FirstOrDefault(m => m.Id == items.UserId) ?? new UserAccount();
                 var record = info.FirstOrDefault(m => m.Id == items.Id);
+
                 if (userAccount.BalanceAmount >= record.ChargeAmount)
                 {
+                    var ChangeType = 0;
+                    var Remark = "";
+                    if (record.ChargeType == 124)//过期机具货款扣费
+                    {
+                        ChangeType = 124;
+                        Remark = "扣机具货款";
+                    }
+                    if (record.ChargeType == 1)//普通预扣款
+                    {
+                        ChangeType = 202;
+                        // Remark = "普通扣款";
+                        Remark = items.Remark;
+                    }
+                    if (record.ChargeType == 2)//分期预扣款
+                    {
+                        ChangeType = 201;
+                        // Remark = "分期扣款";
+                        Remark = items.Remark;
+                    }
                     var userAccountRecord = db.UserAccountRecord.Add(new UserAccountRecord
                     {
                         CreateDate = DateTime.Now,
@@ -159,14 +179,26 @@ namespace MySystem
                         BeforeBalanceAmount = userAccount.BalanceAmount,
                         AfterBalanceAmount = userAccount.BalanceAmount - record.ChargeAmount,
                         ChangeAmount = record.ChargeAmount,
-                        ChangeType = 124,//过期机具货款扣费
-                        Remark = "扣机具货款",
+                        ChangeType = ChangeType,
+                        Remark = Remark,
 
                     }).Entity;
                     record.Status = 1;
+                    if (record.ChargeType == 2)
+                    {
+                        var toChargeBackRecordSub = db.ToChargeBackRecordSub.FirstOrDefault(m => m.Id == record.Sort) ?? new ToChargeBackRecordSub();
+                        var toChargeByStage = db.ToChargeByStage.FirstOrDefault(m => m.Id == toChargeBackRecordSub.ParentId && m.TimeNumber > m.QueryCount) ?? new ToChargeByStage();
+                        toChargeBackRecordSub.Status = 1;
+                        toChargeByStage.QueryCount += 1;
+                        toChargeByStage.ChargeAmount += toChargeBackRecordSub.ChargeAmount;
+                        if (toChargeByStage.TimeNumber == toChargeByStage.QueryCount)
+                        {
+                            toChargeByStage.Status = 1;
+                        }
+                    }
                     if (userAccount.ToChargeAmount >= record.ChargeAmount)
                     {
-                        userAccount.ToChargeAmount -= record.ChargeAmount;//扣减预扣款
+                        userAccount.ToChargeAmount -= record.ChargeAmount;//分期扣款
                     }
                     userAccount.BalanceAmount -= record.ChargeAmount;//扣减余额
                 }

+ 21 - 0
Models/ExportExcels.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class ExportExcels
+    {
+        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 string FileName { get; set; }
+        public int SysId { get; set; }
+        public string FileUrl { get; set; }
+    }
+}

+ 15 - 0
Models/KqProducts.cs

@@ -18,5 +18,20 @@ namespace MySystem.Models
         public string SeoKeyword { get; set; }
         public string SeoDescription { get; set; }
         public string Name { get; set; }
+        public int CountOfBox { get; set; }
+        public int MinStock { get; set; }
+        public int Kind { get; set; }
+        public int NoticeMoneyUnit { get; set; }
+        public int ReqMoneyUnit { get; set; }
+        public string AdColId { get; set; }
+        public decimal DefaultDeposit { get; set; }
+        public ulong MerNameWithStar { get; set; }
+        public ulong SingleDepositApi { get; set; }
+        public decimal ActTradeAmount { get; set; }
+        public decimal PosPrice { get; set; }
+        public int MainStoreId { get; set; }
+        public string SpProductType { get; set; }
+        public decimal FluxProfit { get; set; }
+        public decimal FluxAmount { get; set; }
     }
 }

+ 3 - 0
Models/MerchantDepositReturns.cs

@@ -19,5 +19,8 @@ namespace MySystem.Models
         public decimal ReturnAmount { get; set; }
         public string AlipayAccountNo { get; set; }
         public int MerchantId { get; set; }
+        public string BankCardNo { get; set; }
+        public string BankName { get; set; }
+        public int PayKind { get; set; }
     }
 }

+ 2 - 0
Models/PosMerchantInfoBak.cs

@@ -43,5 +43,7 @@ namespace MySystem.Models
         public string MerchantMobile { get; set; }
         public string MerchantName { get; set; }
         public string MerchantNo { get; set; }
+        public int StandardMonths { get; set; }
+        public int StandardStatus { get; set; }
     }
 }

+ 3 - 0
Models/ToChargeBackRecord.cs

@@ -19,5 +19,8 @@ namespace MySystem.Models
         public int ChargeType { get; set; }
         public decimal ChargeAmount { get; set; }
         public int UserId { get; set; }
+        public decimal TotalAmount { get; set; }
+        public int TimeNumber { get; set; }
+        public DateTime? StartDate { get; set; }
     }
 }

+ 23 - 0
Models/ToChargeBackRecordSub.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class ToChargeBackRecordSub
+    {
+        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 TimeNumber { get; set; }
+        public DateTime? StartDate { get; set; }
+        public string Remark { get; set; }
+        public decimal ChargeAmount { get; set; }
+        public int ParentId { get; set; }
+    }
+}

+ 24 - 0
Models/ToChargeByStage.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class ToChargeByStage
+    {
+        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 decimal TotalAmount { get; set; }
+        public int TimeNumber { get; set; }
+        public DateTime? StartDate { get; set; }
+        public string Remark { get; set; }
+        public decimal ChargeAmount { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 11 - 0
Models/UserForMakerCodeBak.cs

@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class UserForMakerCodeBak
+    {
+        public string MakerCode { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 2 - 0
Models/Users.cs

@@ -94,5 +94,7 @@ namespace MySystem.Models
         public DateTime? CreateStoreDate { get; set; }
         public int StoreStock { get; set; }
         public int ThisMonthSend { get; set; }
+        public string BusinessLogo { get; set; }
+        public string BusinessName { get; set; }
     }
 }

+ 228 - 0
Models/WebCMSEntities.cs

@@ -48,6 +48,7 @@ namespace MySystem.Models
         public virtual DbSet<CouponsForUser> CouponsForUser { get; set; }
         public virtual DbSet<CustomTagSet> CustomTagSet { get; set; }
         public virtual DbSet<ErpCompanys> ErpCompanys { get; set; }
+        public virtual DbSet<ExportExcels> ExportExcels { get; set; }
         public virtual DbSet<FileUpdateInfo> FileUpdateInfo { get; set; }
         public virtual DbSet<FluxProfitDetail> FluxProfitDetail { get; set; }
         public virtual DbSet<FluxProfitSummary> FluxProfitSummary { get; set; }
@@ -214,6 +215,8 @@ namespace MySystem.Models
         public virtual DbSet<TmpCert> TmpCert { get; set; }
         public virtual DbSet<TmpTradeNo> TmpTradeNo { get; set; }
         public virtual DbSet<ToChargeBackRecord> ToChargeBackRecord { get; set; }
+        public virtual DbSet<ToChargeBackRecordSub> ToChargeBackRecordSub { get; set; }
+        public virtual DbSet<ToChargeByStage> ToChargeByStage { get; set; }
         public virtual DbSet<TradeDaySummary> TradeDaySummary { get; set; }
         public virtual DbSet<TradeRecord> TradeRecord { get; set; }
         public virtual DbSet<TradeRecordTest> TradeRecordTest { get; set; }
@@ -235,6 +238,7 @@ namespace MySystem.Models
         public virtual DbSet<UserDetail> UserDetail { get; set; }
         public virtual DbSet<UserFamilyMember> UserFamilyMember { get; set; }
         public virtual DbSet<UserForMakerCode> UserForMakerCode { get; set; }
+        public virtual DbSet<UserForMakerCodeBak> UserForMakerCodeBak { get; set; }
         public virtual DbSet<UserForMobile> UserForMobile { get; set; }
         public virtual DbSet<UserForRealName> UserForRealName { get; set; }
         public virtual DbSet<UserFriend> UserFriend { get; set; }
@@ -2683,6 +2687,48 @@ namespace MySystem.Models
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<ExportExcels>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.FileName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.FileUrl)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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.SysId).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+            });
+
             modelBuilder.Entity<FileUpdateInfo>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
@@ -3886,6 +3932,15 @@ namespace MySystem.Models
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
+                entity.Property(e => e.ActTradeAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.AdColId)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CountOfBox).HasColumnType("int(11)");
+
                 entity.Property(e => e.CreateDate).HasColumnType("datetime");
 
                 entity.Property(e => e.CreateMan)
@@ -3893,13 +3948,35 @@ namespace MySystem.Models
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.DefaultDeposit).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.FluxAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.FluxProfit).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.Kind).HasColumnType("int(11)");
+
+                entity.Property(e => e.MainStoreId).HasColumnType("int(11)");
+
+                entity.Property(e => e.MerNameWithStar)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.MinStock).HasColumnType("int(11)");
+
                 entity.Property(e => e.Name)
                     .HasColumnType("varchar(50)")
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.NoticeMoneyUnit).HasColumnType("int(11)");
+
+                entity.Property(e => e.PosPrice).HasColumnType("decimal(18,2)");
+
                 entity.Property(e => e.QueryCount).HasColumnType("int(11)");
 
+                entity.Property(e => e.ReqMoneyUnit).HasColumnType("int(11)");
+
                 entity.Property(e => e.SeoDescription)
                     .HasColumnType("varchar(500)")
                     .HasCharSet("utf8")
@@ -3915,8 +3992,17 @@ namespace MySystem.Models
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.SingleDepositApi)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
                 entity.Property(e => e.Sort).HasColumnType("int(11)");
 
+                entity.Property(e => e.SpProductType)
+                    .HasColumnType("varchar(10)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.Status).HasColumnType("int(11)");
 
                 entity.Property(e => e.UpdateDate).HasColumnType("datetime");
@@ -5692,6 +5778,16 @@ namespace MySystem.Models
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.BankCardNo)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.BankName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.CreateDate).HasColumnType("datetime");
 
                 entity.Property(e => e.MerchantId).HasColumnType("int(11)");
@@ -5701,6 +5797,8 @@ namespace MySystem.Models
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.PayKind).HasColumnType("int(11)");
+
                 entity.Property(e => e.QueryCount).HasColumnType("int(11)");
 
                 entity.Property(e => e.ReturnAmount).HasColumnType("decimal(18,2)");
@@ -8859,6 +8957,9 @@ namespace MySystem.Models
 
             modelBuilder.Entity<PosMerchantInfoBak>(entity =>
             {
+                entity.HasIndex(e => new { e.KqSnNo, e.KqMerNo })
+                    .HasName("PosMerchantInfoBakIndex");
+
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
                 entity.Property(e => e.ActType).HasColumnType("int(11)");
@@ -8975,6 +9076,10 @@ namespace MySystem.Models
 
                 entity.Property(e => e.Sort).HasColumnType("int(11)");
 
+                entity.Property(e => e.StandardMonths).HasColumnType("int(11)");
+
+                entity.Property(e => e.StandardStatus).HasColumnType("int(11)");
+
                 entity.Property(e => e.Status).HasColumnType("int(11)");
 
                 entity.Property(e => e.TopUserId).HasColumnType("int(11)");
@@ -9114,6 +9219,9 @@ namespace MySystem.Models
 
             modelBuilder.Entity<PreSendStockDetail>(entity =>
             {
+                entity.HasIndex(e => new { e.FromUserId, e.ToUserId })
+                    .HasName("PreSendStockDetailIndex");
+
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
                 entity.Property(e => e.ApplyDate).HasColumnType("datetime");
@@ -14323,8 +14431,102 @@ namespace MySystem.Models
 
                 entity.Property(e => e.Sort).HasColumnType("int(11)");
 
+                entity.Property(e => e.StartDate).HasColumnType("datetime");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TimeNumber).HasColumnType("int(11)");
+
+                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<ToChargeBackRecordSub>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ChargeAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.ParentId).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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.StartDate).HasColumnType("datetime");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TimeNumber).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+            });
+
+            modelBuilder.Entity<ToChargeByStage>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ChargeAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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.StartDate).HasColumnType("datetime");
+
                 entity.Property(e => e.Status).HasColumnType("int(11)");
 
+                entity.Property(e => e.TimeNumber).HasColumnType("int(11)");
+
+                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18,2)");
+
                 entity.Property(e => e.UpdateDate).HasColumnType("datetime");
 
                 entity.Property(e => e.UserId).HasColumnType("int(11)");
@@ -14515,6 +14717,9 @@ namespace MySystem.Models
 
             modelBuilder.Entity<TradeRecord>(entity =>
             {
+                entity.HasIndex(e => new { e.BrandId, e.UserId, e.MerchantId, e.MerNo, e.SnNo })
+                    .HasName("TradeRecordIndex");
+
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
                 entity.Property(e => e.ActStatus).HasColumnType("int(11)");
@@ -15947,6 +16152,19 @@ namespace MySystem.Models
                 entity.Property(e => e.UserId).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<UserForMakerCodeBak>(entity =>
+            {
+                entity.HasKey(e => e.MakerCode)
+                    .HasName("PRIMARY");
+
+                entity.Property(e => e.MakerCode)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
             modelBuilder.Entity<UserForMobile>(entity =>
             {
                 entity.HasKey(e => e.Mobile)
@@ -17457,6 +17675,16 @@ namespace MySystem.Models
 
                 entity.Property(e => e.BusinessFlag).HasColumnType("int(11)");
 
+                entity.Property(e => e.BusinessLogo)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.BusinessName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.CarIds)
                     .HasColumnType("varchar(100)")
                     .HasCharSet("utf8")

+ 21 - 0
PxcModels/ExportExcels.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class ExportExcels
+    {
+        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 string FileName { get; set; }
+        public int SysId { get; set; }
+        public string FileUrl { get; set; }
+    }
+}

+ 15 - 0
PxcModels/KqProducts.cs

@@ -18,5 +18,20 @@ namespace MySystem.PxcModels
         public string SeoKeyword { get; set; }
         public string SeoDescription { get; set; }
         public string Name { get; set; }
+        public int CountOfBox { get; set; }
+        public int MinStock { get; set; }
+        public int Kind { get; set; }
+        public int NoticeMoneyUnit { get; set; }
+        public int ReqMoneyUnit { get; set; }
+        public string AdColId { get; set; }
+        public decimal DefaultDeposit { get; set; }
+        public ulong MerNameWithStar { get; set; }
+        public ulong SingleDepositApi { get; set; }
+        public decimal ActTradeAmount { get; set; }
+        public decimal PosPrice { get; set; }
+        public int MainStoreId { get; set; }
+        public string SpProductType { get; set; }
+        public decimal FluxProfit { get; set; }
+        public decimal FluxAmount { get; set; }
     }
 }

+ 3 - 0
PxcModels/MerchantDepositReturns.cs

@@ -19,5 +19,8 @@ namespace MySystem.PxcModels
         public decimal ReturnAmount { get; set; }
         public string AlipayAccountNo { get; set; }
         public int MerchantId { get; set; }
+        public string BankCardNo { get; set; }
+        public string BankName { get; set; }
+        public int PayKind { get; set; }
     }
 }

+ 2 - 0
PxcModels/PosMerchantInfoBak.cs

@@ -43,5 +43,7 @@ namespace MySystem.PxcModels
         public string MerchantMobile { get; set; }
         public string MerchantName { get; set; }
         public string MerchantNo { get; set; }
+        public int StandardMonths { get; set; }
+        public int StandardStatus { get; set; }
     }
 }

+ 3 - 0
PxcModels/ToChargeBackRecord.cs

@@ -19,5 +19,8 @@ namespace MySystem.PxcModels
         public int ChargeType { get; set; }
         public decimal ChargeAmount { get; set; }
         public int UserId { get; set; }
+        public decimal TotalAmount { get; set; }
+        public int TimeNumber { get; set; }
+        public DateTime? StartDate { get; set; }
     }
 }

+ 23 - 0
PxcModels/ToChargeBackRecordSub.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class ToChargeBackRecordSub
+    {
+        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 TimeNumber { get; set; }
+        public DateTime? StartDate { get; set; }
+        public string Remark { get; set; }
+        public decimal ChargeAmount { get; set; }
+        public int ParentId { get; set; }
+    }
+}

+ 24 - 0
PxcModels/ToChargeByStage.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class ToChargeByStage
+    {
+        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 decimal TotalAmount { get; set; }
+        public int TimeNumber { get; set; }
+        public DateTime? StartDate { get; set; }
+        public string Remark { get; set; }
+        public decimal ChargeAmount { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 11 - 0
PxcModels/UserForMakerCodeBak.cs

@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class UserForMakerCodeBak
+    {
+        public string MakerCode { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 2 - 0
PxcModels/Users.cs

@@ -94,5 +94,7 @@ namespace MySystem.PxcModels
         public DateTime? CreateStoreDate { get; set; }
         public int StoreStock { get; set; }
         public int ThisMonthSend { get; set; }
+        public string BusinessLogo { get; set; }
+        public string BusinessName { get; set; }
     }
 }

+ 228 - 0
PxcModels/WebCMSEntities.cs

@@ -48,6 +48,7 @@ namespace MySystem.PxcModels
         public virtual DbSet<CouponsForUser> CouponsForUser { get; set; }
         public virtual DbSet<CustomTagSet> CustomTagSet { get; set; }
         public virtual DbSet<ErpCompanys> ErpCompanys { get; set; }
+        public virtual DbSet<ExportExcels> ExportExcels { get; set; }
         public virtual DbSet<FileUpdateInfo> FileUpdateInfo { get; set; }
         public virtual DbSet<FluxProfitDetail> FluxProfitDetail { get; set; }
         public virtual DbSet<FluxProfitSummary> FluxProfitSummary { get; set; }
@@ -214,6 +215,8 @@ namespace MySystem.PxcModels
         public virtual DbSet<TmpCert> TmpCert { get; set; }
         public virtual DbSet<TmpTradeNo> TmpTradeNo { get; set; }
         public virtual DbSet<ToChargeBackRecord> ToChargeBackRecord { get; set; }
+        public virtual DbSet<ToChargeBackRecordSub> ToChargeBackRecordSub { get; set; }
+        public virtual DbSet<ToChargeByStage> ToChargeByStage { get; set; }
         public virtual DbSet<TradeDaySummary> TradeDaySummary { get; set; }
         public virtual DbSet<TradeRecord> TradeRecord { get; set; }
         public virtual DbSet<TradeRecordTest> TradeRecordTest { get; set; }
@@ -235,6 +238,7 @@ namespace MySystem.PxcModels
         public virtual DbSet<UserDetail> UserDetail { get; set; }
         public virtual DbSet<UserFamilyMember> UserFamilyMember { get; set; }
         public virtual DbSet<UserForMakerCode> UserForMakerCode { get; set; }
+        public virtual DbSet<UserForMakerCodeBak> UserForMakerCodeBak { get; set; }
         public virtual DbSet<UserForMobile> UserForMobile { get; set; }
         public virtual DbSet<UserForRealName> UserForRealName { get; set; }
         public virtual DbSet<UserFriend> UserFriend { get; set; }
@@ -2683,6 +2687,48 @@ namespace MySystem.PxcModels
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<ExportExcels>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.FileName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.FileUrl)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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.SysId).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+            });
+
             modelBuilder.Entity<FileUpdateInfo>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
@@ -3886,6 +3932,15 @@ namespace MySystem.PxcModels
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
+                entity.Property(e => e.ActTradeAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.AdColId)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CountOfBox).HasColumnType("int(11)");
+
                 entity.Property(e => e.CreateDate).HasColumnType("datetime");
 
                 entity.Property(e => e.CreateMan)
@@ -3893,13 +3948,35 @@ namespace MySystem.PxcModels
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.DefaultDeposit).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.FluxAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.FluxProfit).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.Kind).HasColumnType("int(11)");
+
+                entity.Property(e => e.MainStoreId).HasColumnType("int(11)");
+
+                entity.Property(e => e.MerNameWithStar)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.MinStock).HasColumnType("int(11)");
+
                 entity.Property(e => e.Name)
                     .HasColumnType("varchar(50)")
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.NoticeMoneyUnit).HasColumnType("int(11)");
+
+                entity.Property(e => e.PosPrice).HasColumnType("decimal(18,2)");
+
                 entity.Property(e => e.QueryCount).HasColumnType("int(11)");
 
+                entity.Property(e => e.ReqMoneyUnit).HasColumnType("int(11)");
+
                 entity.Property(e => e.SeoDescription)
                     .HasColumnType("varchar(500)")
                     .HasCharSet("utf8")
@@ -3915,8 +3992,17 @@ namespace MySystem.PxcModels
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.SingleDepositApi)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
                 entity.Property(e => e.Sort).HasColumnType("int(11)");
 
+                entity.Property(e => e.SpProductType)
+                    .HasColumnType("varchar(10)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.Status).HasColumnType("int(11)");
 
                 entity.Property(e => e.UpdateDate).HasColumnType("datetime");
@@ -5692,6 +5778,16 @@ namespace MySystem.PxcModels
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.BankCardNo)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.BankName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.CreateDate).HasColumnType("datetime");
 
                 entity.Property(e => e.MerchantId).HasColumnType("int(11)");
@@ -5701,6 +5797,8 @@ namespace MySystem.PxcModels
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.PayKind).HasColumnType("int(11)");
+
                 entity.Property(e => e.QueryCount).HasColumnType("int(11)");
 
                 entity.Property(e => e.ReturnAmount).HasColumnType("decimal(18,2)");
@@ -8859,6 +8957,9 @@ namespace MySystem.PxcModels
 
             modelBuilder.Entity<PosMerchantInfoBak>(entity =>
             {
+                entity.HasIndex(e => new { e.KqSnNo, e.KqMerNo })
+                    .HasName("PosMerchantInfoBakIndex");
+
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
                 entity.Property(e => e.ActType).HasColumnType("int(11)");
@@ -8975,6 +9076,10 @@ namespace MySystem.PxcModels
 
                 entity.Property(e => e.Sort).HasColumnType("int(11)");
 
+                entity.Property(e => e.StandardMonths).HasColumnType("int(11)");
+
+                entity.Property(e => e.StandardStatus).HasColumnType("int(11)");
+
                 entity.Property(e => e.Status).HasColumnType("int(11)");
 
                 entity.Property(e => e.TopUserId).HasColumnType("int(11)");
@@ -9114,6 +9219,9 @@ namespace MySystem.PxcModels
 
             modelBuilder.Entity<PreSendStockDetail>(entity =>
             {
+                entity.HasIndex(e => new { e.FromUserId, e.ToUserId })
+                    .HasName("PreSendStockDetailIndex");
+
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
                 entity.Property(e => e.ApplyDate).HasColumnType("datetime");
@@ -14323,8 +14431,102 @@ namespace MySystem.PxcModels
 
                 entity.Property(e => e.Sort).HasColumnType("int(11)");
 
+                entity.Property(e => e.StartDate).HasColumnType("datetime");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TimeNumber).HasColumnType("int(11)");
+
+                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<ToChargeBackRecordSub>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ChargeAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.ParentId).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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.StartDate).HasColumnType("datetime");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TimeNumber).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+            });
+
+            modelBuilder.Entity<ToChargeByStage>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ChargeAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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.StartDate).HasColumnType("datetime");
+
                 entity.Property(e => e.Status).HasColumnType("int(11)");
 
+                entity.Property(e => e.TimeNumber).HasColumnType("int(11)");
+
+                entity.Property(e => e.TotalAmount).HasColumnType("decimal(18,2)");
+
                 entity.Property(e => e.UpdateDate).HasColumnType("datetime");
 
                 entity.Property(e => e.UserId).HasColumnType("int(11)");
@@ -14515,6 +14717,9 @@ namespace MySystem.PxcModels
 
             modelBuilder.Entity<TradeRecord>(entity =>
             {
+                entity.HasIndex(e => new { e.BrandId, e.UserId, e.MerchantId, e.MerNo, e.SnNo })
+                    .HasName("TradeRecordIndex");
+
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
                 entity.Property(e => e.ActStatus).HasColumnType("int(11)");
@@ -15947,6 +16152,19 @@ namespace MySystem.PxcModels
                 entity.Property(e => e.UserId).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<UserForMakerCodeBak>(entity =>
+            {
+                entity.HasKey(e => e.MakerCode)
+                    .HasName("PRIMARY");
+
+                entity.Property(e => e.MakerCode)
+                    .HasColumnType("varchar(30)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
             modelBuilder.Entity<UserForMobile>(entity =>
             {
                 entity.HasKey(e => e.Mobile)
@@ -17457,6 +17675,16 @@ namespace MySystem.PxcModels
 
                 entity.Property(e => e.BusinessFlag).HasColumnType("int(11)");
 
+                entity.Property(e => e.BusinessLogo)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.BusinessName)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.CarIds)
                     .HasColumnType("varchar(100)")
                     .HasCharSet("utf8")

+ 4 - 3
Startup.cs

@@ -127,15 +127,15 @@ namespace MySystem
             {
                 app.UseDeveloperExceptionPage();
                 // app.UseExceptionHandler("/Home/Error");
-                Library.ConfigurationManager.EnvironmentFlag = 1;
+                // Library.ConfigurationManager.EnvironmentFlag = 1;
             }
             else
             {
                 app.UseExceptionHandler("/Home/Error");
                 app.UseHsts();
-                Library.ConfigurationManager.EnvironmentFlag = 2;
+                // Library.ConfigurationManager.EnvironmentFlag = 2;
             }
-            // Library.ConfigurationManager.EnvironmentFlag = 2;
+            Library.ConfigurationManager.EnvironmentFlag = 1;
             Library.function.WritePage("/", "WebRootPath.txt", env.WebRootPath);
             // app.UseStatusCodePagesWithReExecute("/public/errpage/pc/{0}.html");
 
@@ -223,6 +223,7 @@ namespace MySystem
             // TimeOutPosSendMessageService.Instance.Start(); //过期机具提醒
             // TimeOutPosChargeService.Instance.Start(); //过期机具计算扣费,并添加到待扣款记录
             TimeOutPosChargeService.Instance.StartDoChargeAmount(); //实时监听待扣款记录,并扣费
+            InstallmentDeductionService.Instance.Start();
             // TimeOutPosChargeService.Instance.ListenChargeAmount(); //实时等待过期机具扣款指令,并扣费
 
             DepositReturnStatService.Instance.Start(); //每月1号统计达标商户(退押需要的)