lichunlei 3 лет назад
Родитель
Сommit
131fed9840

+ 64 - 1
AppStart/Helper/AlipayPayBack2Service.cs

@@ -67,7 +67,70 @@ namespace MySystem
                                 order.PayDate = DateTime.Now;
                                 order.PayStatus = 1;
                                 db.SaveChanges();
-                                BothdisDbconn.Instance.SendMq("Pop:Orders", order);
+                                RedisDbconn.Instance.Set("Orders:" + order.Id, order);
+
+                                OrderProduct pro = db.OrderProduct.FirstOrDefault(m => m.OrderId == OrderId);
+                                if (pro != null)
+                                {
+                                    KqProducts brand = db.KqProducts.FirstOrDefault(m => m.Sort == pro.ProductId);
+                                    if (brand != null)
+                                    {
+                                        int BuyCount = pro.ProductCount;
+                                        int Kind = 0;
+                                        if(pro.ProductPrice == 200) Kind = 1;
+                                        if(pro.ProductPrice == 300) Kind = 2;
+                                        string Codes = "";
+                                        var coupons = db.PosCoupons.Where(m => m.IsLock == 0 && m.IsUse == 0 && m.UserId == 0 && m.QueryCount == Kind).OrderBy(m => m.Id).Take(BuyCount).ToList();
+                                        foreach (var coupon in coupons)
+                                        {
+                                            PosCoupons item = db.PosCoupons.FirstOrDefault(m => m.Id == coupon.Id);
+                                            if (item != null)
+                                            {
+                                                item.CreateDate = DateTime.Now;
+                                                item.UserId = order.UserId;
+                                                item.UpdateDate = DateTime.Now.AddDays(180);
+                                                Codes += item.ExchangeCode + ",";
+                                            }
+                                        }
+                                        order.SnNos = Codes.TrimEnd(',');
+                                        string ChangeRecordNo = "SC" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8);
+                                        PosCouponForUser forUser = db.PosCouponForUser.FirstOrDefault(m => m.Id == order.UserId);
+                                        if (forUser == null)
+                                        {
+                                            forUser = db.PosCouponForUser.Add(new PosCouponForUser()
+                                            {
+                                                Id = order.UserId,
+                                            }).Entity;
+                                            db.SaveChanges();
+                                        }
+                                        int BeforeOut = forUser.OutNum;
+                                        int BeforeTotal = forUser.TotalNum;
+                                        int BeforeStock = forUser.StockNum;
+                                        forUser.OutNum += BuyCount;
+                                        forUser.StockNum -= BuyCount;
+                                        int AfterOut = forUser.OutNum;
+                                        int AfterTotal = forUser.TotalNum;
+                                        int AfterStock = forUser.StockNum;
+                                        PosCouponOrders stat = db.PosCouponOrders.Add(new PosCouponOrders()
+                                        {
+                                            QueryCount = Kind,
+                                            CreateDate = DateTime.Now,
+                                            ChangeKind = 2,
+                                            ChangeCount = BuyCount,
+                                            AfterOut = AfterOut,
+                                            AfterTotal = AfterTotal,
+                                            AfterStock = AfterStock,
+                                            BeforeOut = BeforeOut,
+                                            BeforeTotal = BeforeTotal,
+                                            BeforeStock = BeforeStock,
+                                            OrderNo = ChangeRecordNo,
+                                            ToUserId = order.UserId,
+                                            FromUserId = 0,
+                                        }).Entity;
+                                        db.SaveChanges();
+                                        RedisDbconn.Instance.Clear("Orders:" + order.Id);
+                                    }
+                                }
                             }
                         }
                     }

+ 20 - 9
AppStart/Helper/StatService.cs

@@ -129,6 +129,17 @@ namespace MySystem
                     AfterNum = Mobile.Substring(7);
                 }
                 string Name = bind.MerName;
+                if (bind.ProductType == "2")
+                {
+                    if (Name.Contains("-"))
+                    {
+                        Name = Name.Split('-')[1];
+                    }
+                    else if (Name.Contains("_"))
+                    { 
+                        Name = Name.Split('_')[1];
+                    }
+                }
                 PxcModels.Users user = db.Users.FirstOrDefault(m => m.Mobile.StartsWith(BeforeNum) && m.Mobile.EndsWith(AfterNum) && m.RealName == Name && m.AuthFlag == 1 && m.MerchantType == 0);
                 if (user != null)
                 {
@@ -160,7 +171,7 @@ namespace MySystem
             foreach (var user in users)
             {
                 int machineCount = db.PosMachinesTwo.Count(m => m.UserId == user.Id && m.PosSnType == 0);
-                if (machineCount > 1)
+                if (machineCount >= 3)
                 {
                     Users edit = db.Users.FirstOrDefault(m => m.Id == user.Id);
                     if (edit != null)
@@ -279,14 +290,14 @@ namespace MySystem
                 PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId);
                 if (merchant != null)
                 {
-                    Users user = db.Users.FirstOrDefault(m => m.Id == merchant.UserId);
-                    if (user != null)
-                    {
-                        if (user.MerchantType == 1)
-                        { 
-                            user = db.Users.FirstOrDefault(m => m.Id == user.ParentUserId);
-                        }
-                    }
+                    Users user = db.Users.FirstOrDefault(m => m.Id == pos.UserId);
+                    // if (user != null)
+                    // {
+                    //     if (user.MerchantType == 1)
+                    //     { 
+                    //         user = db.Users.FirstOrDefault(m => m.Id == user.ParentUserId);
+                    //     }
+                    // }
                     string ParentNav = "";
                     if (user != null)
                     {

+ 7 - 4
AppStart/Helper/SycnSpServer/SycnSpActiveService.cs

@@ -49,10 +49,13 @@ namespace MySystem
                     {
                         // pos.ActivationState = 1;
                         // pos.ActivationTime = DateTime.Now;
-                        pos.SeoKeyword = act.SeoTitle;
-                        db.SaveChanges();
-                        RedisDbconn.Instance.Set("PosMachinesTwo:" + pos.Id, pos);
-                        RedisDbconn.Instance.Set("PosMachinesTwo:" + pos.PosSn, pos);
+                        if (pos.BrandId == 2)
+                        {
+                            pos.SeoKeyword = act.SeoTitle;
+                            db.SaveChanges();
+                            RedisDbconn.Instance.Set("PosMachinesTwo:" + pos.Id, pos);
+                            RedisDbconn.Instance.Set("PosMachinesTwo:" + pos.PosSn, pos);
+                        }
 
                         // PxcModels.PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId);
                         // if (merchant != null)

+ 4 - 3
AppStart/Helper/SycnSpServer/SycnSpService.cs

@@ -22,13 +22,14 @@ namespace MySystem
                 {
                     string Kind = OrderString.Split(':')[1];
                     dosomething(Kind);
-                    jobInfo.Status = 1;
-                    jobInfo.Msg = "执行完成";
-                    RabbitMQClient.Instance.SendMsg(Newtonsoft.Json.JsonConvert.SerializeObject(jobInfo), "SycnSpServerBack");
+                    // jobInfo.Status = 1;
+                    // jobInfo.Msg = "执行完成";
+                    // RabbitMQClient.Instance.SendMsg(Newtonsoft.Json.JsonConvert.SerializeObject(jobInfo), "SycnSpServerBack");
                 }
             }
             catch (Exception ex)
             {
+                function.WriteLog(DateTime.Now.ToString() + "\r\n" + ex.ToString(), "同步SP数据到MAIN异常");
             }
         }
 

+ 10 - 0
AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

@@ -36,6 +36,16 @@ namespace MySystem
                     if (trade.TradeAmount == 9900 || trade.TradeAmount == 19900 || trade.TradeAmount == 29900)
                     {
                         op = false;
+                        PxcModels.MachineForMerNo posFor = db.MachineForMerNo.FirstOrDefault(m => m.MerNo == trade.MerNo) ?? new PxcModels.MachineForMerNo();
+                        PxcModels.PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == posFor.SnId);
+                        if (pos != null)
+                        {
+                            if (trade.SerEntryMode == "N" && trade.ProductType == "1")
+                            {
+                                pos.SeoKeyword = trade.TradeAmount.ToString("f2");
+                                db.SaveChanges();
+                            }
+                        }
                         TradeRecord edit = spdb.TradeRecord.FirstOrDefault(m => m.Id == trade.Id);
                         if (edit != null)
                         {

+ 1 - 1
AppStart/Timer/SycnSpTimer.cs

@@ -15,7 +15,7 @@ public class SycnSpTimer : BackgroundService
     {
         while (!stoppingToken.IsCancellationRequested)
         {
-            int timespan = 10;
+            int timespan = 100;
             await Task.Delay(timespan).ContinueWith(tsk =>
             {
                 DoWorks();

+ 5 - 0
Controllers/HomeController.cs

@@ -143,6 +143,11 @@ namespace MySystem.Controllers
         }
 
         // 补激活奖励
+        public string setmeruser(string date)
+        {
+            StatService.Instance.dosomething1(date);
+            return "ok";
+        }
         public string chkactprize(int Id = 0)
         {
             if (Id > 0)

+ 21 - 0
Models/PosCouponForUser.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class PosCouponForUser
+    {
+        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 OutNum { get; set; }
+        public int TotalNum { get; set; }
+        public int StockNum { get; set; }
+    }
+}

+ 29 - 0
Models/PosCouponOrders.cs

@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class PosCouponOrders
+    {
+        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 ChangeKind { get; set; }
+        public int ChangeCount { get; set; }
+        public int AfterOut { get; set; }
+        public int AfterTotal { get; set; }
+        public int AfterStock { get; set; }
+        public int BeforeOut { get; set; }
+        public int BeforeTotal { get; set; }
+        public int BeforeStock { get; set; }
+        public string OrderNo { get; set; }
+        public int ToUserId { get; set; }
+        public int FromUserId { get; set; }
+    }
+}

+ 23 - 0
Models/PosCouponRecord.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class PosCouponRecord
+    {
+        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 ChangeKind { get; set; }
+        public string OrderNo { get; set; }
+        public int ToUserId { get; set; }
+        public int FromUserId { get; set; }
+        public int PosCouponId { get; set; }
+    }
+}

+ 23 - 0
Models/PosCoupons.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.Models
+{
+    public partial class PosCoupons
+    {
+        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 DateTime? UseDate { get; set; }
+        public ulong IsLock { get; set; }
+        public ulong IsUse { get; set; }
+        public string ExchangeCode { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 11 - 0
Models/TmpCert.cs

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

+ 202 - 0
Models/WebCMSEntities.cs

@@ -92,6 +92,10 @@ namespace MySystem.Models
         public virtual DbSet<Orders> Orders { get; set; }
         public virtual DbSet<PageInfo> PageInfo { get; set; }
         public virtual DbSet<PageUpdateInfo> PageUpdateInfo { get; set; }
+        public virtual DbSet<PosCouponForUser> PosCouponForUser { get; set; }
+        public virtual DbSet<PosCouponOrders> PosCouponOrders { get; set; }
+        public virtual DbSet<PosCouponRecord> PosCouponRecord { get; set; }
+        public virtual DbSet<PosCoupons> PosCoupons { get; set; }
         public virtual DbSet<PosMachines> PosMachines { get; set; }
         public virtual DbSet<PosMachinesTwo> PosMachinesTwo { get; set; }
         public virtual DbSet<PosMerchantInfo> PosMerchantInfo { get; set; }
@@ -149,6 +153,7 @@ namespace MySystem.Models
         public virtual DbSet<TeamDayTop> TeamDayTop { get; set; }
         public virtual DbSet<TeamOfferApply> TeamOfferApply { get; set; }
         public virtual DbSet<TeamPersonDayTop> TeamPersonDayTop { get; set; }
+        public virtual DbSet<TmpCert> TmpCert { get; set; }
         public virtual DbSet<TradeDaySummary> TradeDaySummary { get; set; }
         public virtual DbSet<TradeRecord> TradeRecord { get; set; }
         public virtual DbSet<UploadParams> UploadParams { get; set; }
@@ -6150,6 +6155,187 @@ namespace MySystem.Models
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<PosCouponForUser>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.OutNum).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.StockNum).HasColumnType("int(11)");
+
+                entity.Property(e => e.TotalNum).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+            });
+
+            modelBuilder.Entity<PosCouponOrders>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AfterOut).HasColumnType("int(11)");
+
+                entity.Property(e => e.AfterStock).HasColumnType("int(11)");
+
+                entity.Property(e => e.AfterTotal).HasColumnType("int(11)");
+
+                entity.Property(e => e.BeforeOut).HasColumnType("int(11)");
+
+                entity.Property(e => e.BeforeStock).HasColumnType("int(11)");
+
+                entity.Property(e => e.BeforeTotal).HasColumnType("int(11)");
+
+                entity.Property(e => e.ChangeCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.ChangeKind).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.FromUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.OrderNo)
+                    .HasColumnType("varchar(50)")
+                    .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.ToUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+            });
+
+            modelBuilder.Entity<PosCouponRecord>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ChangeKind).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.FromUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.OrderNo)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PosCouponId).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.ToUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+            });
+
+            modelBuilder.Entity<PosCoupons>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.ExchangeCode)
+                    .HasColumnType("varchar(10)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.IsLock)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.IsUse)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                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.UseDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
             modelBuilder.Entity<PosMachines>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
@@ -10336,6 +10522,22 @@ namespace MySystem.Models
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<TmpCert>(entity =>
+            {
+                entity.HasKey(e => e.MakerCode)
+                    .HasName("PRIMARY");
+
+                entity.Property(e => e.MakerCode)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("latin1")
+                    .HasCollation("latin1_swedish_ci");
+
+                entity.Property(e => e.CertId)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("latin1")
+                    .HasCollation("latin1_swedish_ci");
+            });
+
             modelBuilder.Entity<TradeDaySummary>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");

+ 21 - 0
PxcModels/PosCouponForUser.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class PosCouponForUser
+    {
+        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 OutNum { get; set; }
+        public int TotalNum { get; set; }
+        public int StockNum { get; set; }
+    }
+}

+ 29 - 0
PxcModels/PosCouponOrders.cs

@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class PosCouponOrders
+    {
+        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 ChangeKind { get; set; }
+        public int ChangeCount { get; set; }
+        public int AfterOut { get; set; }
+        public int AfterTotal { get; set; }
+        public int AfterStock { get; set; }
+        public int BeforeOut { get; set; }
+        public int BeforeTotal { get; set; }
+        public int BeforeStock { get; set; }
+        public string OrderNo { get; set; }
+        public int ToUserId { get; set; }
+        public int FromUserId { get; set; }
+    }
+}

+ 23 - 0
PxcModels/PosCouponRecord.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class PosCouponRecord
+    {
+        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 ChangeKind { get; set; }
+        public string OrderNo { get; set; }
+        public int ToUserId { get; set; }
+        public int FromUserId { get; set; }
+        public int PosCouponId { get; set; }
+    }
+}

+ 23 - 0
PxcModels/PosCoupons.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class PosCoupons
+    {
+        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 DateTime? UseDate { get; set; }
+        public ulong IsLock { get; set; }
+        public ulong IsUse { get; set; }
+        public string ExchangeCode { get; set; }
+        public int UserId { get; set; }
+    }
+}

+ 11 - 0
PxcModels/TmpCert.cs

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

+ 202 - 0
PxcModels/WebCMSEntities.cs

@@ -92,6 +92,10 @@ namespace MySystem.PxcModels
         public virtual DbSet<Orders> Orders { get; set; }
         public virtual DbSet<PageInfo> PageInfo { get; set; }
         public virtual DbSet<PageUpdateInfo> PageUpdateInfo { get; set; }
+        public virtual DbSet<PosCouponForUser> PosCouponForUser { get; set; }
+        public virtual DbSet<PosCouponOrders> PosCouponOrders { get; set; }
+        public virtual DbSet<PosCouponRecord> PosCouponRecord { get; set; }
+        public virtual DbSet<PosCoupons> PosCoupons { get; set; }
         public virtual DbSet<PosMachines> PosMachines { get; set; }
         public virtual DbSet<PosMachinesTwo> PosMachinesTwo { get; set; }
         public virtual DbSet<PosMerchantInfo> PosMerchantInfo { get; set; }
@@ -149,6 +153,7 @@ namespace MySystem.PxcModels
         public virtual DbSet<TeamDayTop> TeamDayTop { get; set; }
         public virtual DbSet<TeamOfferApply> TeamOfferApply { get; set; }
         public virtual DbSet<TeamPersonDayTop> TeamPersonDayTop { get; set; }
+        public virtual DbSet<TmpCert> TmpCert { get; set; }
         public virtual DbSet<TradeDaySummary> TradeDaySummary { get; set; }
         public virtual DbSet<TradeRecord> TradeRecord { get; set; }
         public virtual DbSet<UploadParams> UploadParams { get; set; }
@@ -6150,6 +6155,187 @@ namespace MySystem.PxcModels
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<PosCouponForUser>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.OutNum).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.StockNum).HasColumnType("int(11)");
+
+                entity.Property(e => e.TotalNum).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+            });
+
+            modelBuilder.Entity<PosCouponOrders>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.AfterOut).HasColumnType("int(11)");
+
+                entity.Property(e => e.AfterStock).HasColumnType("int(11)");
+
+                entity.Property(e => e.AfterTotal).HasColumnType("int(11)");
+
+                entity.Property(e => e.BeforeOut).HasColumnType("int(11)");
+
+                entity.Property(e => e.BeforeStock).HasColumnType("int(11)");
+
+                entity.Property(e => e.BeforeTotal).HasColumnType("int(11)");
+
+                entity.Property(e => e.ChangeCount).HasColumnType("int(11)");
+
+                entity.Property(e => e.ChangeKind).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.FromUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.OrderNo)
+                    .HasColumnType("varchar(50)")
+                    .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.ToUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+            });
+
+            modelBuilder.Entity<PosCouponRecord>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ChangeKind).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.FromUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.OrderNo)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.PosCouponId).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.ToUserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.UpdateDate).HasColumnType("datetime");
+            });
+
+            modelBuilder.Entity<PosCoupons>(entity =>
+            {
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate).HasColumnType("datetime");
+
+                entity.Property(e => e.ExchangeCode)
+                    .HasColumnType("varchar(10)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.IsLock)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                entity.Property(e => e.IsUse)
+                    .HasColumnType("bit(1)")
+                    .HasDefaultValueSql("b'0'");
+
+                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.UseDate).HasColumnType("datetime");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+            });
+
             modelBuilder.Entity<PosMachines>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
@@ -10336,6 +10522,22 @@ namespace MySystem.PxcModels
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<TmpCert>(entity =>
+            {
+                entity.HasKey(e => e.MakerCode)
+                    .HasName("PRIMARY");
+
+                entity.Property(e => e.MakerCode)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("latin1")
+                    .HasCollation("latin1_swedish_ci");
+
+                entity.Property(e => e.CertId)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("latin1")
+                    .HasCollation("latin1_swedish_ci");
+            });
+
             modelBuilder.Entity<TradeDaySummary>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");

BIN
bin/Debug/netcoreapp3.0/MySystem.dll


BIN
bin/Debug/netcoreapp3.0/MySystem.pdb


BIN
bin/release/netcoreapp3.0/MySystem.dll


BIN
bin/release/netcoreapp3.0/MySystem.pdb


BIN
obj/Debug/netcoreapp3.0/MySystem.dll


BIN
obj/Debug/netcoreapp3.0/MySystem.pdb


BIN
obj/release/netcoreapp3.0/MySystem.dll


BIN
obj/release/netcoreapp3.0/MySystem.pdb