Browse Source

增加换绑和解绑线程程序,目前乐刷可用

lichunlei 3 years ago
parent
commit
8d5200224d

+ 1 - 0
AppStart/Helper/SycnSpServer/SycnSpBindService.cs

@@ -42,6 +42,7 @@ namespace MySystem
                             {
                                 pos.BindingState = 1;
                                 pos.BindingTime = Bind.CreateTime;
+                                pos.Status = 0;
                                 PxcModels.MachineForMerNo merFor = db.MachineForMerNo.FirstOrDefault(m => m.MerNo == Bind.MerNo);
                                 if (merFor == null)
                                 {

+ 154 - 0
AppStart/Helper/SycnSpServer/SycnSpChangeBindService.cs

@@ -0,0 +1,154 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using MySystem.SpModels;
+using Library;
+using LitJson;
+using System.Threading;
+
+namespace MySystem
+{
+    public class SycnSpChangeBindService
+    {
+        public readonly static SycnSpChangeBindService Instance = new SycnSpChangeBindService();
+        private SycnSpChangeBindService()
+        { }
+
+        public void Start()
+        {
+            Thread th = new Thread(StartDo);
+            th.IsBackground = true;
+            th.Start();
+        }
+
+        public void StartDo()
+        {
+            while (true)
+            {
+                try
+                {
+                    WebCMSEntities spdb = new WebCMSEntities();
+                    PxcModels.WebCMSEntities db = new PxcModels.WebCMSEntities();
+                    DateTime start = DateTime.Now.AddDays(-2);
+                    List<ChangeBindRecord> Binds = spdb.ChangeBindRecord.Where(m => m.ReBindTime >= start && m.Status == 1).OrderByDescending(m => m.Id).ToList();
+                    foreach (ChangeBindRecord Bind in Binds)
+                    {
+                        var tran = db.Database.BeginTransaction();
+                        try
+                        {
+                            string OldSnNum = Bind.MerSnNo;
+                            string NewSnNum = Bind.MerNewSnNo;
+                            string MerNo = Bind.MerNo;
+                            PxcModels.PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.KqMerNo == MerNo) ?? new PxcModels.PosMerchantInfo();
+                            PxcModels.MachineForSnNo oldForSnNo = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == OldSnNum) ?? new PxcModels.MachineForSnNo();
+                            PxcModels.MachineForSnNo newForSnNo = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == NewSnNum) ?? new PxcModels.MachineForSnNo();
+                            PxcModels.PosMachinesTwo oldpos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == oldForSnNo.SnId);
+                            PxcModels.PosMachinesTwo newpos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == newForSnNo.SnId);
+                            PxcModels.StoreHouse BackStore = db.StoreHouse.FirstOrDefault(m => m.Id == oldpos.StoreId) ?? new PxcModels.StoreHouse();
+                            PxcModels.StoreHouse OutStore = db.StoreHouse.FirstOrDefault(m => m.Id == newpos.StoreId) ?? new PxcModels.StoreHouse();
+                            string ChangeNo = "BMC" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(3);
+                            PxcModels.MachineChange add = db.MachineChange.Add(new PxcModels.MachineChange()
+                            {
+                                CreateDate = DateTime.Now,
+                                UpdateDate = DateTime.Now,
+                                ChangeNo = ChangeNo, //转换单号
+                                UserId = 0, //创客
+                                ChangeTime = DateTime.Now, //转换时间
+                                BackStoreId = BackStore.Id, //退回仓库
+                                BackStoreName = BackStore.StoreName, //退回仓库名称
+                                Remark = "机具更换", //订单备注
+                                BackStoreUserId = BackStore.UserId, //退回仓库归属人
+                                OutProductType = int.Parse(OutStore.BrandId), //出库产品类型
+                                OutProductName = OutStore.ProductName, //出库产品名称
+                                OutStoreId = OutStore.Id, //出库仓库
+                                OutStoreName = OutStore.StoreName, //出库仓库名称
+                                OutStoreAreas = OutStore.Areas, //出库仓库所在地区
+                                OutStoreAddress = OutStore.Address, //出库仓库地址
+                                OutStoreManager = "", //出库仓库联系人
+                                OutStoreManagerMobile = OutStore.ManageMobile, //出库仓库联系人手机号
+                            }).Entity;
+                            db.SaveChanges();
+                            int BackProductType = 0;
+                            string BackProductName = "";
+                            string ChangeDeviceName = "";
+                            string ChangeSnExpand = "";
+                            PxcModels.KqProducts oldPosBrand = db.KqProducts.FirstOrDefault(m => m.Id == oldpos.BrandId) ?? new PxcModels.KqProducts();
+                            PxcModels.KqProducts newPosBrand = db.KqProducts.FirstOrDefault(m => m.Id == newpos.BrandId) ?? new PxcModels.KqProducts();
+                            newpos.BindMerchantId = merchant.Id;
+                            newpos.BuyUserId = oldpos.BuyUserId;
+                            newpos.UserId = oldpos.UserId;
+                            newpos.RecycEndDate = oldpos.RecycEndDate;
+                            newpos.ScanQrTrade = oldpos.ScanQrTrade;
+                            newpos.DebitCardTrade = oldpos.DebitCardTrade;
+                            newpos.CreditTrade = oldpos.CreditTrade;
+                            newpos.PosSnType = oldpos.PosSnType;
+                            newpos.TransferTime = oldpos.TransferTime;
+                            newpos.IsPurchase = oldpos.IsPurchase;
+                            newpos.BindingState = oldpos.BindingState;
+                            newpos.ActivationState = oldpos.ActivationState;
+                            newpos.BindingTime = oldpos.BindingTime;
+                            newpos.ActivationTime = oldpos.ActivationTime;
+                            // bool checkActReward = db.ActiveReward.Any(m => m.KqMerNo == merchant.KqMerNo);
+                            // if (!checkActReward)
+                            // {
+                            newpos.SeoKeyword = oldpos.SeoKeyword;
+                            newpos.PrizeParams = oldpos.PrizeParams;
+                            newpos.LeaderUserId= oldpos.LeaderUserId;
+                            // }
+                            // oldpos.BuyUserId = 0;
+                            // oldpos.UserId = 0;
+                            oldpos.Status = -1;
+                            PxcModels.MachineForMerNo forMerNo = db.MachineForMerNo.FirstOrDefault(m => m.MerNo == merchant.KqMerNo);
+                            if (forMerNo != null)
+                            {
+                                forMerNo.SnId = newpos.Id;
+                            }
+                            merchant.KqSnNo = NewSnNum;
+                            db.MachineChangeDetail.Add(new PxcModels.MachineChangeDetail()
+                            {
+                                CreateDate = DateTime.Now,
+                                UpdateDate = DateTime.Now,
+                                ChangeNo = ChangeNo, //订单号
+                                ChangeId = add.Id, //订单Id
+                                BackProductType = oldpos.BrandId, //退回产品类型
+                                BackProductName = oldPosBrand.Name, //退回产品名称
+                                UserId = 0, //创客
+                                BackSnNo = oldpos.PosSn, //设备SN编号
+                                OutProductType = newpos.BrandId, //出库产品类型
+                                OutProductName = newPosBrand.Name, //出库产品名称
+                                OutSnNo = newpos.PosSn, //出库设备SN编号
+                                OutSnType = newpos.PosSnType, //出库SN机具类型
+                                Remark = "机具更换", //备注
+                                BackSnType = oldpos.PosSnType, //退回SN机具类型
+                            });
+                            db.SaveChanges();
+                            BackProductType = oldpos.BrandId;
+                            BackProductName = newPosBrand.Name;
+                            ChangeDeviceName = oldpos.DeviceName;
+                            ChangeSnExpand = oldpos.PosSn;                            
+                            add.BackProductType = BackProductType; //退回产品类型
+                            add.BackProductName = BackProductName; //退回产品名称
+                            add.ChangeDeviceName = ChangeDeviceName; //转换机具名称
+                            add.ChangeDeviceNum = 1; //转换机具数量
+                            add.ChangeSnExpand = ChangeSnExpand; //机具SN
+                            db.SaveChanges();
+                        }
+                        catch (Exception ex)
+                        {
+                            tran.Rollback();
+                            function.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString() + "\n" + Bind.Id, "同步SP换绑数据到MAIN异常");
+                        }
+                        tran.Dispose();
+                    }
+                    spdb.Dispose();
+                    db.Dispose();
+                }
+                catch (Exception ex)
+                {
+                    function.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString(), "同步SP换绑数据到MAIN异常");
+                }
+                Thread.Sleep(1000);
+            }
+        }
+    }
+}

+ 100 - 0
AppStart/Helper/SycnSpServer/SycnSpUnBindService.cs

@@ -0,0 +1,100 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using MySystem.SpModels;
+using Library;
+using LitJson;
+using System.Threading;
+
+namespace MySystem
+{
+    public class SycnSpUnBindService
+    {
+        public readonly static SycnSpUnBindService Instance = new SycnSpUnBindService();
+        private SycnSpUnBindService()
+        { }
+
+        public void Start()
+        {
+            Thread th = new Thread(StartDo);
+            th.IsBackground = true;
+            th.Start();
+        }
+
+        public void StartDo()
+        {
+            while (true)
+            {
+                try
+                {
+                    WebCMSEntities spdb = new WebCMSEntities();
+                    PxcModels.WebCMSEntities db = new PxcModels.WebCMSEntities();
+                    DateTime start = DateTime.Now.AddDays(-2);
+                    List<UnBindRecord> Binds = spdb.UnBindRecord.Where(m => m.UnBindTime >= start && m.Status == 1).OrderByDescending(m => m.Id).ToList();
+                    foreach (UnBindRecord Bind in Binds)
+                    {
+                        var tran = db.Database.BeginTransaction();
+                        try
+                        {
+                            string PosSn = Bind.MerSnNo;
+                            string MerNo = Bind.MerNo;
+                            PxcModels.MachineForSnNo forSnNo = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == PosSn);
+                            PxcModels.MachineForMerNo forMerNo = db.MachineForMerNo.FirstOrDefault(m => m.MerNo == MerNo);
+                            PxcModels.PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == forSnNo.SnId && m.Id == forMerNo.SnId);
+                            if (pos.ActivationState == 0 && pos.BuyUserId == 0 && pos.BindingState == 0)
+                            {                            
+                                if (forMerNo != null)
+                                {
+                                    db.MachineForMerNo.Remove(forMerNo);
+                                    db.SaveChanges();
+                                }
+                                db.MachineUnBind.Add(new PxcModels.MachineUnBind()
+                                {
+                                    CreateDate = DateTime.Now,
+                                    MerchantId = pos.BindMerchantId,
+                                    AuditDate = DateTime.Now,
+                                    AuditDesc = "乐刷推送解绑",
+                                    AuditStatus = 1,
+                                    SnNo = pos.PosSn,
+                                    BrandId = pos.BrandId,
+                                    UserId = pos.BuyUserId,
+                                    ApplyNo = "U" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8),
+                                });
+                                pos.BindMerchantId = 0;
+                                pos.BindingState = 0;
+                                pos.BindingTime = DateTime.Parse("1900-01-01");
+                                pos.UserId = pos.BuyUserId;
+                                string IdBrand = pos.BuyUserId + "_" + pos.BrandId;
+                                PxcModels.UserMachineData userData = db.UserMachineData.FirstOrDefault(m => m.IdBrand == IdBrand);
+                                if (userData == null)
+                                {
+                                    userData = db.UserMachineData.Add(new PxcModels.UserMachineData()
+                                    {
+                                        IdBrand = IdBrand,
+                                    }).Entity;
+                                    db.SaveChanges();
+                                }
+                                userData.BindCount -= 1;
+                                userData.UnBindCount += 1;
+                                db.SaveChanges();
+                            }
+                        }
+                        catch (Exception ex)
+                        {
+                            tran.Rollback();
+                            function.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString() + "\n" + Bind.Id, "同步SP解绑数据到MAIN异常");
+                        }
+                        tran.Dispose();
+                    }
+                    spdb.Dispose();
+                    db.Dispose();
+                }
+                catch (Exception ex)
+                {
+                    function.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString(), "同步SP解绑数据到MAIN异常");
+                }
+                Thread.Sleep(1000);
+            }
+        }
+    }
+}

+ 37 - 0
SpModels/ChangeBindRecord.cs

@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.SpModels
+{
+    public partial class ChangeBindRecord
+    {
+        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 string AgentNo { get; set; }
+        public string Field5 { get; set; }
+        public string Field4 { get; set; }
+        public string Field3 { get; set; }
+        public string Field2 { get; set; }
+        public string Field1 { get; set; }
+        public string ChannelSerial { get; set; }
+        public DateTime? ReBindTime { get; set; }
+        public DateTime? ConfirmTime { get; set; }
+        public string Remark { get; set; }
+        public string MerNewSnNo { get; set; }
+        public string ProductType { get; set; }
+        public string MerSnNo { get; set; }
+        public string MerName { get; set; }
+        public string AgentName { get; set; }
+        public string MerNo { get; set; }
+    }
+}

+ 35 - 0
SpModels/UnBindRecord.cs

@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.SpModels
+{
+    public partial class UnBindRecord
+    {
+        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 string AgentNo { get; set; }
+        public string Field5 { get; set; }
+        public string Field4 { get; set; }
+        public string Field3 { get; set; }
+        public string Field2 { get; set; }
+        public string Field1 { get; set; }
+        public string ChannelSerial { get; set; }
+        public DateTime? UnBindTime { get; set; }
+        public string Remark { get; set; }
+        public string ProductType { get; set; }
+        public string MerSnNo { get; set; }
+        public string MerName { get; set; }
+        public string AgentName { get; set; }
+        public string MerNo { get; set; }
+    }
+}

+ 227 - 0
SpModels/WebCMSEntities.cs

@@ -17,6 +17,7 @@ namespace MySystem.SpModels
 
         public virtual DbSet<ActivateRecord> ActivateRecord { get; set; }
         public virtual DbSet<BindRecord> BindRecord { get; set; }
+        public virtual DbSet<ChangeBindRecord> ChangeBindRecord { get; set; }
         public virtual DbSet<CustomerTableRecord> CustomerTableRecord { get; set; }
         public virtual DbSet<KqActivate> KqActivate { get; set; }
         public virtual DbSet<KqActivateCallBack> KqActivateCallBack { get; set; }
@@ -36,6 +37,7 @@ namespace MySystem.SpModels
         public virtual DbSet<SysLog> SysLog { get; set; }
         public virtual DbSet<TradeFluxRecord> TradeFluxRecord { get; set; }
         public virtual DbSet<TradeRecord> TradeRecord { get; set; }
+        public virtual DbSet<UnBindRecord> UnBindRecord { get; set; }
 
         protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
         {
@@ -292,6 +294,122 @@ namespace MySystem.SpModels
                 entity.Property(e => e.UpdateTime).HasColumnType("datetime");
             });
 
+            modelBuilder.Entity<ChangeBindRecord>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AgentName)
+                    .HasColumnType("varchar(64)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AgentNo)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ChannelSerial)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ConfirmTime).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.Field1)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field2)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field3)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field4)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field5)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerName)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerNewSnNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerSnNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ProductType)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.QueryCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.ReBindTime).HasColumnType("datetime");
+
+                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.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).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.Version).HasColumnType("int(11)");
+            });
+
             modelBuilder.Entity<CustomerTableRecord>(entity =>
             {
                 entity.HasKey(e => e.TableEnName)
@@ -2002,6 +2120,115 @@ namespace MySystem.SpModels
                 entity.Property(e => e.UpdateDate).HasColumnType("datetime");
             });
 
+            modelBuilder.Entity<UnBindRecord>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AgentName)
+                    .HasColumnType("varchar(64)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.AgentNo)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ChannelSerial)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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.Field1)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field2)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field3)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field4)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Field5)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerName)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.MerSnNo)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ProductType)
+                    .HasColumnType("varchar(32)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                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.Sort).HasColumnType("int(11)");
+
+                entity.Property(e => e.Status).HasColumnType("int(11)");
+
+                entity.Property(e => e.UnBindTime).HasColumnType("datetime");
+
+                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.Version).HasColumnType("int(11)");
+            });
+
             OnModelCreatingPartial(modelBuilder);
         }