Quellcode durchsuchen

重置小分仓额度调整

lichunlei vor 2 Jahren
Ursprung
Commit
aee8e6ea43

+ 31 - 2
AppStart/Timer/ResetSmallStoreHelper.cs

@@ -36,17 +36,18 @@ public class ResetSmallStoreHelper
                 if(!string.IsNullOrEmpty(content))
                 {
                     string Month = DateTime.Now.AddMonths(-1).ToString("yyyyMM");
+                    string PreMonth = DateTime.Now.AddMonths(-2).ToString("yyyyMM");
                     string check = function.ReadInstance("/ResetSmallStore/" + Month + ".txt");
                     if(string.IsNullOrEmpty(check))
                     {
                         function.WritePage("/ResetSmallStore/", Month + ".txt", DateTime.Now.ToString());
                         string minId = "0";
-                        DataTable minIdDt = OtherMySqlConn.dtable("select min(Id) from ProfitRewardRecord where TradeMonth='" + Month + "'");
+                        DataTable minIdDt = OtherMySqlConn.dtable("select min(Id) from ProfitRewardRecord where TradeMonth='" + PreMonth + "'");
                         if(minIdDt.Rows.Count > 0)
                         {
                             minId = minIdDt.Rows[0][0].ToString();
                         }
-                        DataTable dt = OtherMySqlConn.dtable("select UserId,sum(CreditTradeProfit+DebitNonTradeCapProfit+DebitTradeCapProfit) from ProfitRewardRecord where Id>=" + minId + " and UserId>0 and TradeMonth='" + Month + "' group by UserId");
+                        DataTable dt = OtherMySqlConn.dtable("select UserId,sum(CreditTradeProfit+DebitNonTradeCapProfit+DebitTradeCapProfit) from ProfitRewardRecord where Id>=" + minId + " and UserId>0 and TradeMonth='" + PreMonth + "' group by UserId");
                         function.WriteLog("总数" + dt.Rows.Count, "计算小分仓额度日志");
                         int index = 0;
                         foreach(DataRow dr in dt.Rows)
@@ -54,6 +55,34 @@ public class ResetSmallStoreHelper
                             index += 1;
                             int UserId = int.Parse(function.CheckInt(dr["UserId"].ToString()));
                             decimal ProfitAmount = decimal.Parse(function.CheckNum(dr[1].ToString()));
+                            var prelist = db.PreSendStockDetail.Select(m => new { m.Id, m.BrandId, m.ToUserId, m.Status, m.ApplyFlag }).Where(m => m.ToUserId == UserId && m.Status == 1 && m.ApplyFlag == 0);
+                            foreach(var prepos in prelist)
+                            {
+                                if(prepos.BrandId == 1 || prepos.BrandId == 2 || prepos.BrandId == 4 || prepos.BrandId == 6 || prepos.BrandId == 7 || prepos.BrandId == 8)
+                                {
+                                    if(ProfitAmount > 200)
+                                    {
+                                        ProfitAmount -= 200;
+                                        PreSendStockDetail edit = db.PreSendStockDetail.FirstOrDefault(m => m.Id == prepos.Id);
+                                        if(edit != null)
+                                        {
+                                            edit.AuthFlag = 1;
+                                        }
+                                    }
+                                }
+                                else if(prepos.BrandId == 3 || prepos.BrandId == 5 || prepos.BrandId == 9)
+                                {
+                                    if(ProfitAmount > 300)
+                                    {
+                                        ProfitAmount -= 300;
+                                        PreSendStockDetail edit = db.PreSendStockDetail.FirstOrDefault(m => m.Id == prepos.Id);
+                                        if(edit != null)
+                                        {
+                                            edit.AuthFlag = 1;
+                                        }
+                                    }
+                                }
+                            }
                             UserAccount account = db.UserAccount.FirstOrDefault(m => m.Id == UserId);
                             if (account == null)
                             {

+ 91 - 0
AppStart/Timer/SetDespositHelper.cs

@@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Threading;
+using MySystem.Models;
+using Library;
+
+namespace MySystem
+{
+    /// <summary>
+    /// 设置预发机超过30天预发押金自动扣减
+    /// </summary>
+    public class SetDespositHelper
+    {
+        public readonly static SetDespositHelper Instance = new SetDespositHelper();
+        private SetDespositHelper()
+        { }
+
+        public void Start()
+        {
+            Thread th = new Thread(doSomething);
+            th.IsBackground = true;
+            th.Start();
+        }
+
+        public void doSomething()
+        {
+            while (true)
+            {
+                if (DateTime.Now.Hour > 0 && DateTime.Now.Hour < 3)
+                {
+                    try
+                    {
+                        string check = function.ReadInstance("/SetDesposit/check" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt");
+                        if (string.IsNullOrEmpty(check))
+                        {
+                            function.WritePage("/SetDesposit/", "check" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt", DateTime.Now.ToString("HH:mm:ss"));
+                            WebCMSEntities db = new WebCMSEntities();
+                            var date = DateTime.Now.AddDays(-30);
+                            bool op = true;
+                            while (op)
+                            {
+                                var smallPos = db.PreSendStockDetail.Where(m => m.Status == 1 && m.Sort == 0 && m.CreateDate <= date && m.ApplyFlag == 0 && m.AuthFlag == 1).ToList();
+                                foreach (var item in smallPos)
+                                {
+                                    var tuserAccount = db.UserAccount.FirstOrDefault(m => m.Id == item.ToUserId) ?? new UserAccount();
+                                    var brandInfo = db.KqProducts.FirstOrDefault(m => m.Id == item.BrandId);
+                                    var amount = 0;
+                                    if (brandInfo.Name.Contains("电签"))
+                                    {
+                                        amount = 200;
+                                    }
+                                    if (brandInfo.Name.Contains("大POS"))
+                                    {
+                                        amount = 300;
+                                    }
+                                    if (tuserAccount.Id > 0)
+                                    {
+                                        tuserAccount.SmallStoreDeposit += amount;//添加小分仓押金
+                                        tuserAccount.ValidPreAmount += amount;//添加小分仓可用额度
+                                        var add = db.UserAccountRecord.Add(new UserAccountRecord()
+                                        {
+                                            CreateDate = DateTime.Now,
+                                            Remark = "小分仓押金暂扣",
+                                            ChangeType = 63,
+                                            BeforeBalanceAmount = tuserAccount.SmallStoreDeposit - amount, //变更前余额
+                                            AfterBalanceAmount = tuserAccount.SmallStoreDeposit, //变更后余额
+                                            ChangeAmount = amount, //变更金额
+                                            UserId = item.ToUserId,
+
+                                        }).Entity;
+                                        db.SaveChanges();
+                                    }
+                                    item.Sort = 1;
+                                    db.SaveChanges();
+                                }
+                            }
+                            db.Dispose();
+                        }
+                    }
+                    catch (Exception ex)
+                    {
+                        function.WriteLog(DateTime.Now.ToString() + ":" + ex.ToString(), "设置预发机超过30天预发押金自动扣减异常");
+                    }
+                }
+                Thread.Sleep(5000);
+            }
+        }
+    }
+}

+ 47 - 0
Models/PosMerchantInfoBak.cs

@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class PosMerchantInfoBak
+    {
+        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 TopUserId { get; set; }
+        public int MerUserType { get; set; }
+        public string Remark { get; set; }
+        public string City { get; set; }
+        public string Province { get; set; }
+        public int BrandId { get; set; }
+        public int SnStoreId { get; set; }
+        public string ActTypeDesc { get; set; }
+        public int ActType { get; set; }
+        public int RebateQual { get; set; }
+        public DateTime? MerStandardDate { get; set; }
+        public DateTime? KqRegTime { get; set; }
+        public DateTime? MatchTime { get; set; }
+        public int SnApplyUserId { get; set; }
+        public int SnType { get; set; }
+        public int MerUserId { get; set; }
+        public int UserId { get; set; }
+        public string MgrName { get; set; }
+        public string MgrNo { get; set; }
+        public int DirectUserId { get; set; }
+        public int ActiveStatus { get; set; }
+        public int MerStatus { get; set; }
+        public string KqSnNo { get; set; }
+        public string KqMerNo { get; set; }
+        public string MerIdcardNo { get; set; }
+        public string MerRealName { get; set; }
+        public string MerchantMobile { get; set; }
+        public string MerchantName { get; set; }
+        public string MerchantNo { get; set; }
+    }
+}

+ 38 - 0
Models/ProfitRecordCopy1.cs

@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class ProfitRecordCopy1
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int TradeId { get; set; }
+        public string ParentNav { get; set; }
+        public string Remark { get; set; }
+        public int BrandId { get; set; }
+        public ulong DirectFlag { get; set; }
+        public int CapFlag { get; set; }
+        public int QrPayFlag { get; set; }
+        public decimal ProfitAmount { get; set; }
+        public DateTime? ClearDate { get; set; }
+        public DateTime? TradeDate { get; set; }
+        public string SnNo { get; set; }
+        public int MerBuddyType { get; set; }
+        public int HelpMonthCount { get; set; }
+        public ulong MerHelpFlag { get; set; }
+        public string MerNo { get; set; }
+        public int MerchantId { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 24 - 0
Models/SmallStoreQuotaRecord.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class SmallStoreQuotaRecord
+    {
+        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 OperateType { get; set; }
+        public decimal AfterAmount { get; set; }
+        public decimal BeforeAmount { get; set; }
+        public decimal UseAmount { get; set; }
+        public int ApplyId { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 35 - 0
Models/SubsidyRecordCopy1.cs

@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class SubsidyRecordCopy1
+    {
+        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 TradeId { get; set; }
+        public string ParentNav { get; set; }
+        public string Remark { get; set; }
+        public int BrandId { get; set; }
+        public ulong DirectFlag { get; set; }
+        public int CapFlag { get; set; }
+        public int QrPayFlag { get; set; }
+        public decimal ProfitAmount { get; set; }
+        public DateTime? ClearDate { get; set; }
+        public DateTime? TradeDate { get; set; }
+        public string SnNo { get; set; }
+        public int MerBuddyType { get; set; }
+        public int HelpMonthCount { get; set; }
+        public ulong MerHelpFlag { get; set; }
+        public string MerNo { get; set; }
+        public int MerchantId { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 1 - 0
Models/UserAccount.cs

@@ -41,5 +41,6 @@ namespace MySystem.Models
         public decimal TempAmountForBalance { get; set; }
         public decimal ThisMonthPreAmount { get; set; }
         public decimal ValidPreAmount { get; set; }
+        public decimal SmallStoreDeposit { get; set; }
     }
 }

+ 357 - 0
Models/WebCMSEntities.cs

@@ -126,6 +126,7 @@ namespace MySystem.Models
         public virtual DbSet<PosMachinesFeeChangeRecord> PosMachinesFeeChangeRecord { get; set; }
         public virtual DbSet<PosMachinesTwo> PosMachinesTwo { get; set; }
         public virtual DbSet<PosMerchantInfo> PosMerchantInfo { get; set; }
+        public virtual DbSet<PosMerchantInfoBak> PosMerchantInfoBak { get; set; }
         public virtual DbSet<PosMerchantOtherInfo> PosMerchantOtherInfo { get; set; }
         public virtual DbSet<PosMerchantTradeSummay> PosMerchantTradeSummay { get; set; }
         public virtual DbSet<PreSendStockDetail> PreSendStockDetail { get; set; }
@@ -153,6 +154,7 @@ namespace MySystem.Models
         public virtual DbSet<ProfitReceiveRecord> ProfitReceiveRecord { get; set; }
         public virtual DbSet<ProfitReceives> ProfitReceives { get; set; }
         public virtual DbSet<ProfitRecord> ProfitRecord { get; set; }
+        public virtual DbSet<ProfitRecordCopy1> ProfitRecordCopy1 { get; set; }
         public virtual DbSet<ProfitRewardExport> ProfitRewardExport { get; set; }
         public virtual DbSet<ProfitRewardRecord> ProfitRewardRecord { get; set; }
         public virtual DbSet<ProfitRewardRecordCopy1> ProfitRewardRecordCopy1 { get; set; }
@@ -177,6 +179,7 @@ namespace MySystem.Models
         public virtual DbSet<ServiceCenter> ServiceCenter { get; set; }
         public virtual DbSet<SetMerchantTypeRecord> SetMerchantTypeRecord { get; set; }
         public virtual DbSet<SmallStoreHouse> SmallStoreHouse { get; set; }
+        public virtual DbSet<SmallStoreQuotaRecord> SmallStoreQuotaRecord { get; set; }
         public virtual DbSet<SpOrderNos> SpOrderNos { get; set; }
         public virtual DbSet<StoreBalance> StoreBalance { get; set; }
         public virtual DbSet<StoreChangeHistory> StoreChangeHistory { get; set; }
@@ -192,6 +195,7 @@ namespace MySystem.Models
         public virtual DbSet<StoreSwapSn> StoreSwapSn { get; set; }
         public virtual DbSet<SubsidyCheck> SubsidyCheck { get; set; }
         public virtual DbSet<SubsidyRecord> SubsidyRecord { get; set; }
+        public virtual DbSet<SubsidyRecordCopy1> SubsidyRecordCopy1 { get; set; }
         public virtual DbSet<SysAdmin> SysAdmin { get; set; }
         public virtual DbSet<SysAdminRole> SysAdminRole { get; set; }
         public virtual DbSet<SysLog> SysLog { get; set; }
@@ -8673,6 +8677,133 @@ namespace MySystem.Models
                 entity.Property(e => e.UserId).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<PosMerchantInfoBak>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ActType).HasColumnType("int(11)");
+
+                entity.Property(e => e.ActTypeDesc)
+                    .HasColumnType("varchar(64)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ActiveStatus).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.City)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.DirectUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.KqMerNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.KqRegTime).HasColumnType("datetime");
+
+                entity.Property(e => e.KqSnNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MatchTime).HasColumnType("datetime");
+
+                entity.Property(e => e.MerIdcardNo)
+                    .HasColumnType("varchar(18)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerRealName)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerStandardDate).HasColumnType("datetime");
+
+                entity.Property(e => e.MerStatus).HasColumnType("int(11)");
+
+                entity.Property(e => e.MerUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.MerUserType).HasColumnType("int(11)");
+
+                entity.Property(e => e.MerchantMobile)
+                    .HasColumnType("varchar(11)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerchantName)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerchantNo)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MgrName)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MgrNo)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Province)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.RebateQual).HasColumnType("int(11)");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(64)")
+                    .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.SnApplyUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.SnStoreId).HasColumnType("int(11)");
+
+                entity.Property(e => e.SnType).HasColumnType("int(11)");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TopUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
             modelBuilder.Entity<PosMerchantOtherInfo>(entity =>
             {
                 entity.HasKey(e => e.CertId)
@@ -10331,6 +10462,100 @@ namespace MySystem.Models
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<ProfitRecordCopy1>(entity =>
+            {
+                entity.ToTable("ProfitRecord_copy1");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.CapFlag).HasColumnType("int(11)");
+
+                entity.Property(e => e.ClearDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.DirectFlag)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.HelpMonthCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.MerBuddyType).HasColumnType("int(11)");
+
+                entity.Property(e => e.MerHelpFlag)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.MerNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerchantId).HasColumnType("int(11)");
+
+                entity.Property(e => e.ParentNav)
+                    .HasColumnType("varchar(1000)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ProfitAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.QrPayFlag).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(64)")
+                    .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.SnNo)
+                    .HasColumnType("varchar(32)")
+                    .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.TradeDate).HasColumnType("datetime");
+
+                entity.Property(e => e.TradeId).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
             modelBuilder.Entity<ProfitRewardExport>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
@@ -12227,6 +12452,48 @@ namespace MySystem.Models
                 entity.Property(e => e.UserId).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<SmallStoreQuotaRecord>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AfterAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ApplyId).HasColumnType("int(11)");
+
+                entity.Property(e => e.BeforeAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.OperateType).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.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UseAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
             modelBuilder.Entity<SpOrderNos>(entity =>
             {
                 entity.HasKey(e => e.OrderNo)
@@ -13116,6 +13383,94 @@ namespace MySystem.Models
 
             modelBuilder.Entity<SubsidyRecord>(entity =>
             {
+                entity.HasIndex(e => new { e.UserId, e.SeoTitle, e.BrandId })
+                    .HasName("SubsidyRecordIndex");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.CapFlag).HasColumnType("int(11)");
+
+                entity.Property(e => e.ClearDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.DirectFlag)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.HelpMonthCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.MerBuddyType).HasColumnType("int(11)");
+
+                entity.Property(e => e.MerHelpFlag)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.MerNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerchantId).HasColumnType("int(11)");
+
+                entity.Property(e => e.ParentNav)
+                    .HasColumnType("varchar(1000)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ProfitAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.QrPayFlag).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(64)")
+                    .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.SnNo)
+                    .HasColumnType("varchar(32)")
+                    .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.TradeDate).HasColumnType("datetime");
+
+                entity.Property(e => e.TradeId).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<SubsidyRecordCopy1>(entity =>
+            {
+                entity.ToTable("SubsidyRecord_copy1");
+
+                entity.HasIndex(e => new { e.UserId, e.SeoTitle, e.BrandId })
+                    .HasName("SubsidyRecordIndex");
+
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
                 entity.Property(e => e.BrandId).HasColumnType("int(11)");
@@ -14577,6 +14932,8 @@ namespace MySystem.Models
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.SmallStoreDeposit).HasColumnType("decimal(18,2)");
+
                 entity.Property(e => e.Sort).HasColumnType("int(11)");
 
                 entity.Property(e => e.Status).HasColumnType("int(11)");

+ 47 - 0
PxcModels/PosMerchantInfoBak.cs

@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class PosMerchantInfoBak
+    {
+        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 TopUserId { get; set; }
+        public int MerUserType { get; set; }
+        public string Remark { get; set; }
+        public string City { get; set; }
+        public string Province { get; set; }
+        public int BrandId { get; set; }
+        public int SnStoreId { get; set; }
+        public string ActTypeDesc { get; set; }
+        public int ActType { get; set; }
+        public int RebateQual { get; set; }
+        public DateTime? MerStandardDate { get; set; }
+        public DateTime? KqRegTime { get; set; }
+        public DateTime? MatchTime { get; set; }
+        public int SnApplyUserId { get; set; }
+        public int SnType { get; set; }
+        public int MerUserId { get; set; }
+        public int UserId { get; set; }
+        public string MgrName { get; set; }
+        public string MgrNo { get; set; }
+        public int DirectUserId { get; set; }
+        public int ActiveStatus { get; set; }
+        public int MerStatus { get; set; }
+        public string KqSnNo { get; set; }
+        public string KqMerNo { get; set; }
+        public string MerIdcardNo { get; set; }
+        public string MerRealName { get; set; }
+        public string MerchantMobile { get; set; }
+        public string MerchantName { get; set; }
+        public string MerchantNo { get; set; }
+    }
+}

+ 38 - 0
PxcModels/ProfitRecordCopy1.cs

@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class ProfitRecordCopy1
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int QueryCount { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string CreateMan { get; set; }
+        public string UpdateMan { get; set; }
+        public string SeoTitle { get; set; }
+        public string SeoKeyword { get; set; }
+        public string SeoDescription { get; set; }
+        public int TradeId { get; set; }
+        public string ParentNav { get; set; }
+        public string Remark { get; set; }
+        public int BrandId { get; set; }
+        public ulong DirectFlag { get; set; }
+        public int CapFlag { get; set; }
+        public int QrPayFlag { get; set; }
+        public decimal ProfitAmount { get; set; }
+        public DateTime? ClearDate { get; set; }
+        public DateTime? TradeDate { get; set; }
+        public string SnNo { get; set; }
+        public int MerBuddyType { get; set; }
+        public int HelpMonthCount { get; set; }
+        public ulong MerHelpFlag { get; set; }
+        public string MerNo { get; set; }
+        public int MerchantId { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 24 - 0
PxcModels/SmallStoreQuotaRecord.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class SmallStoreQuotaRecord
+    {
+        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 OperateType { get; set; }
+        public decimal AfterAmount { get; set; }
+        public decimal BeforeAmount { get; set; }
+        public decimal UseAmount { get; set; }
+        public int ApplyId { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 35 - 0
PxcModels/SubsidyRecordCopy1.cs

@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class SubsidyRecordCopy1
+    {
+        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 TradeId { get; set; }
+        public string ParentNav { get; set; }
+        public string Remark { get; set; }
+        public int BrandId { get; set; }
+        public ulong DirectFlag { get; set; }
+        public int CapFlag { get; set; }
+        public int QrPayFlag { get; set; }
+        public decimal ProfitAmount { get; set; }
+        public DateTime? ClearDate { get; set; }
+        public DateTime? TradeDate { get; set; }
+        public string SnNo { get; set; }
+        public int MerBuddyType { get; set; }
+        public int HelpMonthCount { get; set; }
+        public ulong MerHelpFlag { get; set; }
+        public string MerNo { get; set; }
+        public int MerchantId { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 1 - 0
PxcModels/UserAccount.cs

@@ -41,5 +41,6 @@ namespace MySystem.PxcModels
         public decimal TempAmountForBalance { get; set; }
         public decimal ThisMonthPreAmount { get; set; }
         public decimal ValidPreAmount { get; set; }
+        public decimal SmallStoreDeposit { get; set; }
     }
 }

+ 357 - 0
PxcModels/WebCMSEntities.cs

@@ -126,6 +126,7 @@ namespace MySystem.PxcModels
         public virtual DbSet<PosMachinesFeeChangeRecord> PosMachinesFeeChangeRecord { get; set; }
         public virtual DbSet<PosMachinesTwo> PosMachinesTwo { get; set; }
         public virtual DbSet<PosMerchantInfo> PosMerchantInfo { get; set; }
+        public virtual DbSet<PosMerchantInfoBak> PosMerchantInfoBak { get; set; }
         public virtual DbSet<PosMerchantOtherInfo> PosMerchantOtherInfo { get; set; }
         public virtual DbSet<PosMerchantTradeSummay> PosMerchantTradeSummay { get; set; }
         public virtual DbSet<PreSendStockDetail> PreSendStockDetail { get; set; }
@@ -153,6 +154,7 @@ namespace MySystem.PxcModels
         public virtual DbSet<ProfitReceiveRecord> ProfitReceiveRecord { get; set; }
         public virtual DbSet<ProfitReceives> ProfitReceives { get; set; }
         public virtual DbSet<ProfitRecord> ProfitRecord { get; set; }
+        public virtual DbSet<ProfitRecordCopy1> ProfitRecordCopy1 { get; set; }
         public virtual DbSet<ProfitRewardExport> ProfitRewardExport { get; set; }
         public virtual DbSet<ProfitRewardRecord> ProfitRewardRecord { get; set; }
         public virtual DbSet<ProfitRewardRecordCopy1> ProfitRewardRecordCopy1 { get; set; }
@@ -177,6 +179,7 @@ namespace MySystem.PxcModels
         public virtual DbSet<ServiceCenter> ServiceCenter { get; set; }
         public virtual DbSet<SetMerchantTypeRecord> SetMerchantTypeRecord { get; set; }
         public virtual DbSet<SmallStoreHouse> SmallStoreHouse { get; set; }
+        public virtual DbSet<SmallStoreQuotaRecord> SmallStoreQuotaRecord { get; set; }
         public virtual DbSet<SpOrderNos> SpOrderNos { get; set; }
         public virtual DbSet<StoreBalance> StoreBalance { get; set; }
         public virtual DbSet<StoreChangeHistory> StoreChangeHistory { get; set; }
@@ -192,6 +195,7 @@ namespace MySystem.PxcModels
         public virtual DbSet<StoreSwapSn> StoreSwapSn { get; set; }
         public virtual DbSet<SubsidyCheck> SubsidyCheck { get; set; }
         public virtual DbSet<SubsidyRecord> SubsidyRecord { get; set; }
+        public virtual DbSet<SubsidyRecordCopy1> SubsidyRecordCopy1 { get; set; }
         public virtual DbSet<SysAdmin> SysAdmin { get; set; }
         public virtual DbSet<SysAdminRole> SysAdminRole { get; set; }
         public virtual DbSet<SysLog> SysLog { get; set; }
@@ -8673,6 +8677,133 @@ namespace MySystem.PxcModels
                 entity.Property(e => e.UserId).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<PosMerchantInfoBak>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ActType).HasColumnType("int(11)");
+
+                entity.Property(e => e.ActTypeDesc)
+                    .HasColumnType("varchar(64)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ActiveStatus).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.City)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.DirectUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.KqMerNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.KqRegTime).HasColumnType("datetime");
+
+                entity.Property(e => e.KqSnNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MatchTime).HasColumnType("datetime");
+
+                entity.Property(e => e.MerIdcardNo)
+                    .HasColumnType("varchar(18)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerRealName)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerStandardDate).HasColumnType("datetime");
+
+                entity.Property(e => e.MerStatus).HasColumnType("int(11)");
+
+                entity.Property(e => e.MerUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.MerUserType).HasColumnType("int(11)");
+
+                entity.Property(e => e.MerchantMobile)
+                    .HasColumnType("varchar(11)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerchantName)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerchantNo)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MgrName)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MgrNo)
+                    .HasColumnType("varchar(16)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Province)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.RebateQual).HasColumnType("int(11)");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(64)")
+                    .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.SnApplyUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.SnStoreId).HasColumnType("int(11)");
+
+                entity.Property(e => e.SnType).HasColumnType("int(11)");
+
+                entity.Property(e => e.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.TopUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
             modelBuilder.Entity<PosMerchantOtherInfo>(entity =>
             {
                 entity.HasKey(e => e.CertId)
@@ -10331,6 +10462,100 @@ namespace MySystem.PxcModels
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<ProfitRecordCopy1>(entity =>
+            {
+                entity.ToTable("ProfitRecord_copy1");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.CapFlag).HasColumnType("int(11)");
+
+                entity.Property(e => e.ClearDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.DirectFlag)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.HelpMonthCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.MerBuddyType).HasColumnType("int(11)");
+
+                entity.Property(e => e.MerHelpFlag)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.MerNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerchantId).HasColumnType("int(11)");
+
+                entity.Property(e => e.ParentNav)
+                    .HasColumnType("varchar(1000)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ProfitAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.QrPayFlag).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(64)")
+                    .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.SnNo)
+                    .HasColumnType("varchar(32)")
+                    .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.TradeDate).HasColumnType("datetime");
+
+                entity.Property(e => e.TradeId).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.Version).HasColumnType("int(11)");
+            });
+
             modelBuilder.Entity<ProfitRewardExport>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
@@ -12227,6 +12452,48 @@ namespace MySystem.PxcModels
                 entity.Property(e => e.UserId).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<SmallStoreQuotaRecord>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AfterAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.ApplyId).HasColumnType("int(11)");
+
+                entity.Property(e => e.BeforeAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.OperateType).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.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UseAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
             modelBuilder.Entity<SpOrderNos>(entity =>
             {
                 entity.HasKey(e => e.OrderNo)
@@ -13116,6 +13383,94 @@ namespace MySystem.PxcModels
 
             modelBuilder.Entity<SubsidyRecord>(entity =>
             {
+                entity.HasIndex(e => new { e.UserId, e.SeoTitle, e.BrandId })
+                    .HasName("SubsidyRecordIndex");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId).HasColumnType("int(11)");
+
+                entity.Property(e => e.CapFlag).HasColumnType("int(11)");
+
+                entity.Property(e => e.ClearDate).HasColumnType("datetime");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.DirectFlag)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.HelpMonthCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.MerBuddyType).HasColumnType("int(11)");
+
+                entity.Property(e => e.MerHelpFlag)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.MerNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerchantId).HasColumnType("int(11)");
+
+                entity.Property(e => e.ParentNav)
+                    .HasColumnType("varchar(1000)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ProfitAmount).HasColumnType("decimal(18,2)");
+
+                entity.Property(e => e.QrPayFlag).HasColumnType("int(11)");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(64)")
+                    .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.SnNo)
+                    .HasColumnType("varchar(32)")
+                    .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.TradeDate).HasColumnType("datetime");
+
+                entity.Property(e => e.TradeId).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
+            modelBuilder.Entity<SubsidyRecordCopy1>(entity =>
+            {
+                entity.ToTable("SubsidyRecord_copy1");
+
+                entity.HasIndex(e => new { e.UserId, e.SeoTitle, e.BrandId })
+                    .HasName("SubsidyRecordIndex");
+
                 entity.Property(e => e.Id).HasColumnType("int(11)");
 
                 entity.Property(e => e.BrandId).HasColumnType("int(11)");
@@ -14577,6 +14932,8 @@ namespace MySystem.PxcModels
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.SmallStoreDeposit).HasColumnType("decimal(18,2)");
+
                 entity.Property(e => e.Sort).HasColumnType("int(11)");
 
                 entity.Property(e => e.Status).HasColumnType("int(11)");

+ 1 - 1
Startup.cs

@@ -212,7 +212,7 @@ namespace MySystem
             SetDepositPostService.Instance.Start(); //提交支付公司设置费率接口
             SetDepositPostService.Instance.StartKdb(); //监控开店宝费率设置结果
             SetFeeFlagService.Instance.Start(); //178天提前通知创客费率调升消息
-            ResetSmallStoreHelper.Instance.Start();
+            ResetSmallStoreHelper.Instance.Start(); //每月重置小分仓额度
 
             // StatService.Instance.StartPosActNum(); //实时统计激活数
             // StatService.Instance.StartNewUserNum(); //实时统计新增创客数