فهرست منبع

每月1号统计上月有效wifi

lcl 1 ماه پیش
والد
کامیت
2bd9a315f9

BIN
.DS_Store


+ 76 - 0
AppStart/WifiCheckHelper.cs

@@ -0,0 +1,76 @@
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using System.Linq;
+using System.Data;
+using MySystem;
+using MySystem.PxcModels;
+using Library;
+using LitJson;
+
+public class WifiCheckHelper
+{
+    public readonly static WifiCheckHelper Instance = new WifiCheckHelper();
+    private WifiCheckHelper()
+    {
+    }
+
+    public void Start()
+    {
+        Thread th = new Thread(DoWorks);
+        th.IsBackground = true;
+        th.Start();
+    }
+
+    private void DoWorks()
+    {
+        while (true)
+        {
+            try
+            {
+                if(DateTime.Now.AddMonths(1).Day == 1 && DateTime.Now.Hour > 22)
+                {
+                    DoSomething();
+                }
+                Thread.Sleep(900000);
+            }
+            catch (Exception ex)
+            {
+                function.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString(), "WIFI检查异常");
+            }
+        }
+    }
+
+    public void DoSomething()
+    {
+        string Month = DateTime.Now.ToString("yyyyMM");
+        string chk = function.ReadInstance("/wifi/check" + Month + ".txt");
+        if(!string.IsNullOrEmpty(chk))
+        {
+            return;
+        }
+        function.WritePage("/wifi/", "check" + Month + ".txt", DateTime.Now.ToString());
+        WebCMSEntities db = new WebCMSEntities();
+        MySystem.JavaProductModels.WebCMSEntities javadb = new MySystem.JavaProductModels.WebCMSEntities();
+        int i = 0;
+        List<WifiTradeRecord> trades = db.WifiTradeRecord.Where(m => m.Duration > m.DoMonths).ToList();
+        foreach(WifiTradeRecord trade in trades)
+        {
+            i += 1;
+            javadb.KxsMachineThali.Add(new MySystem.JavaProductModels.KxsMachineThali()
+            {
+                MonthTime = int.Parse(Month),
+                PosSn = trade.SnNo,
+                BrandId = trade.BrandId,
+                CreateTime = DateTime.Now,
+            });
+            if(i % 200 == 0)
+            {
+                javadb.SaveChanges();
+            }
+        }
+        javadb.SaveChanges();
+        javadb.Dispose();
+        db.Dispose();
+    }
+}

+ 30 - 0
JavaProductModels/KxsJdReport.cs

@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.JavaProductModels
+{
+    public partial class KxsJdReport
+    {
+        public int Id { get; set; }
+        public DateTime? SendTime { get; set; }
+        public int IsAward { get; set; }
+        public int StoreNum { get; set; }
+        public int WalletStatus { get; set; }
+        public int SignStatus { get; set; }
+        public int EnterStatus { get; set; }
+        public int IsCheck { get; set; }
+        public DateTime? AuditTime { get; set; }
+        public string JdMchName { get; set; }
+        public string JdMchId { get; set; }
+        public int JdStatus { get; set; }
+        public int Status { get; set; }
+        public string Remark { get; set; }
+        public string UserCode { get; set; }
+        public string Username { get; set; }
+        public int UserId { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 20 - 0
JavaProductModels/KxsMachineSalesAfter.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.JavaProductModels
+{
+    public partial class KxsMachineSalesAfter
+    {
+        public int Id { get; set; }
+        public int UserId { get; set; }
+        public int BrandId { get; set; }
+        public string Remark { get; set; }
+        public int OperationType { get; set; }
+        public string PosSn { get; set; }
+        public string CreateBy { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+        public int DelFlag { get; set; }
+        public int Version { get; set; }
+    }
+}

+ 17 - 0
JavaProductModels/KxsMachineThali.cs

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

+ 1 - 0
JavaProductModels/KxsMerchantReturn.cs

@@ -22,5 +22,6 @@ namespace MySystem.JavaProductModels
         public DateTime? CreateTime { get; set; }
         public string DelFlag { get; set; }
         public int Version { get; set; }
+        public decimal CashPledge { get; set; }
     }
 }

+ 1 - 0
JavaProductModels/KxsShopOrder.cs

@@ -34,5 +34,6 @@ namespace MySystem.JavaProductModels
         public int DelFlag { get; set; }
         public DateTime? UpdateTime { get; set; }
         public DateTime? CreateTime { get; set; }
+        public decimal ReturnLimit { get; set; }
     }
 }

+ 22 - 0
JavaProductModels/KxsShopOrderReturnLog.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.JavaProductModels
+{
+    public partial class KxsShopOrderReturnLog
+    {
+        public int Id { get; set; }
+        public string UserCode { get; set; }
+        public int OrderId { get; set; }
+        public string Remark { get; set; }
+        public string Kind { get; set; }
+        public string VariationCause { get; set; }
+        public int VariationType { get; set; }
+        public decimal Amount { get; set; }
+        public int UserId { get; set; }
+        public int Version { get; set; }
+        public int DelFlag { get; set; }
+        public DateTime? UpdateTime { get; set; }
+        public DateTime? CreateTime { get; set; }
+    }
+}

+ 304 - 0
JavaProductModels/WebCMSEntities.cs

@@ -20,6 +20,7 @@ namespace MySystem.JavaProductModels
         public virtual DbSet<KxsBrandType> KxsBrandType { get; set; }
         public virtual DbSet<KxsGdOrder> KxsGdOrder { get; set; }
         public virtual DbSet<KxsGdReport> KxsGdReport { get; set; }
+        public virtual DbSet<KxsJdReport> KxsJdReport { get; set; }
         public virtual DbSet<KxsMachine> KxsMachine { get; set; }
         public virtual DbSet<KxsMachineAdvance> KxsMachineAdvance { get; set; }
         public virtual DbSet<KxsMachineAdvanceInfo> KxsMachineAdvanceInfo { get; set; }
@@ -31,6 +32,8 @@ namespace MySystem.JavaProductModels
         public virtual DbSet<KxsMachineExpInfo> KxsMachineExpInfo { get; set; }
         public virtual DbSet<KxsMachinePledge> KxsMachinePledge { get; set; }
         public virtual DbSet<KxsMachineRatio> KxsMachineRatio { get; set; }
+        public virtual DbSet<KxsMachineSalesAfter> KxsMachineSalesAfter { get; set; }
+        public virtual DbSet<KxsMachineThali> KxsMachineThali { get; set; }
         public virtual DbSet<KxsMachineTrack> KxsMachineTrack { get; set; }
         public virtual DbSet<KxsMachineTransfer> KxsMachineTransfer { get; set; }
         public virtual DbSet<KxsMachineUnbind> KxsMachineUnbind { get; set; }
@@ -45,6 +48,7 @@ namespace MySystem.JavaProductModels
         public virtual DbSet<KxsShopGoodsSpec> KxsShopGoodsSpec { get; set; }
         public virtual DbSet<KxsShopOrder> KxsShopOrder { get; set; }
         public virtual DbSet<KxsShopOrderInfo> KxsShopOrderInfo { get; set; }
+        public virtual DbSet<KxsShopOrderReturnLog> KxsShopOrderReturnLog { get; set; }
         public virtual DbSet<KxsTicket> KxsTicket { get; set; }
         public virtual DbSet<KxsTicketTransfer> KxsTicketTransfer { get; set; }
         public virtual DbSet<KxsTicketTransferInfo> KxsTicketTransferInfo { get; set; }
@@ -645,6 +649,116 @@ namespace MySystem.JavaProductModels
                     .HasComment("版本");
             });
 
+            modelBuilder.Entity<KxsJdReport>(entity =>
+            {
+                entity.ToTable("kxs_jd_report");
+
+                entity.HasComment("京东报备入网表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.AuditTime)
+                    .HasColumnName("audit_time")
+                    .HasColumnType("datetime")
+                    .HasComment("审核时间");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.EnterStatus)
+                    .HasColumnName("enter_status")
+                    .HasComment("入驻申请审核 已提交=0 审核通过=1 未审核通过=-1");
+
+                entity.Property(e => e.IsAward)
+                    .HasColumnName("is_award")
+                    .HasComment("奖励发放 1已发放");
+
+                entity.Property(e => e.IsCheck)
+                    .HasColumnName("is_check")
+                    .HasComment("是否匹配 1已匹配");
+
+                entity.Property(e => e.JdMchId)
+                    .HasColumnName("jd_mch_id")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("京东商户ID")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.JdMchName)
+                    .HasColumnName("jd_mch_name")
+                    .HasColumnType("varchar(64)")
+                    .HasComment("京东商户名称")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.JdStatus)
+                    .HasColumnName("jd_status")
+                    .HasComment("京东审核状态 待进件=0 待签约=4 待审核=3 未通过=2 已完成=1");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnName("remark")
+                    .HasColumnType("varchar(1000)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.SendTime)
+                    .HasColumnName("send_time")
+                    .HasColumnType("datetime")
+                    .HasComment("发放奖励时间");
+
+                entity.Property(e => e.SignStatus)
+                    .HasColumnName("sign_status")
+                    .HasComment("合同签署状态 未签署完成=0 签署正常=1");
+
+                entity.Property(e => e.Status)
+                    .HasColumnName("status")
+                    .HasComment("状态 报备中=0 已作废=-1 已完成=1 未通过=2");
+
+                entity.Property(e => e.StoreNum)
+                    .HasColumnName("store_num")
+                    .HasComment("营业门店数");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserCode)
+                    .HasColumnName("user_code")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("创客编号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasComment("创客ID");
+
+                entity.Property(e => e.Username)
+                    .HasColumnName("username")
+                    .HasColumnType("varchar(32)")
+                    .HasComment("创客姓名")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+
+                entity.Property(e => e.WalletStatus)
+                    .HasColumnName("wallet_status")
+                    .HasComment("京东钱包绑定 未绑定=0 已绑定=1");
+            });
+
             modelBuilder.Entity<KxsMachine>(entity =>
             {
                 entity.ToTable("kxs_machine");
@@ -1687,6 +1801,112 @@ namespace MySystem.JavaProductModels
                     .HasComment("版本");
             });
 
+            modelBuilder.Entity<KxsMachineSalesAfter>(entity =>
+            {
+                entity.ToTable("kxs_machine_sales_after");
+
+                entity.HasComment("机具售后表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("ID");
+
+                entity.Property(e => e.BrandId)
+                    .HasColumnName("brand_id")
+                    .HasComment("品牌id");
+
+                entity.Property(e => e.CreateBy)
+                    .HasColumnName("create_by")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("创建人")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记");
+
+                entity.Property(e => e.OperationType)
+                    .HasColumnName("operation_type")
+                    .HasComment("操作类型");
+
+                entity.Property(e => e.PosSn)
+                    .HasColumnName("pos_sn")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("机具号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnName("remark")
+                    .HasColumnType("varchar(100)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasComment("用户id");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本号");
+            });
+
+            modelBuilder.Entity<KxsMachineThali>(entity =>
+            {
+                entity.ToTable("kxs_machine_thali");
+
+                entity.HasComment("机具套餐表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("ID");
+
+                entity.Property(e => e.BrandId)
+                    .HasColumnName("brand_id")
+                    .HasComment("品牌id");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记");
+
+                entity.Property(e => e.MonthTime)
+                    .HasColumnName("month_time")
+                    .HasComment("月时间(yyyyMM)");
+
+                entity.Property(e => e.PosSn)
+                    .HasColumnName("pos_sn")
+                    .HasColumnType("varchar(50)")
+                    .HasComment("机具sn")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本号");
+            });
+
             modelBuilder.Entity<KxsMachineTrack>(entity =>
             {
                 entity.ToTable("kxs_machine_track");
@@ -2083,6 +2303,11 @@ namespace MySystem.JavaProductModels
                     .HasCharSet("utf8mb3")
                     .HasCollation("utf8mb3_general_ci");
 
+                entity.Property(e => e.CashPledge)
+                    .HasColumnName("cash_pledge")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("押金");
+
                 entity.Property(e => e.CreateBy)
                     .HasColumnName("create_by")
                     .HasColumnType("varchar(64)")
@@ -2753,6 +2978,11 @@ namespace MySystem.JavaProductModels
                     .HasCharSet("utf8mb4")
                     .HasCollation("utf8mb4_0900_ai_ci");
 
+                entity.Property(e => e.ReturnLimit)
+                    .HasColumnName("return_limit")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("需返还额度");
+
                 entity.Property(e => e.ReturnPrice)
                     .HasColumnName("return_price")
                     .HasColumnType("decimal(18,2)")
@@ -2898,6 +3128,80 @@ namespace MySystem.JavaProductModels
                     .HasComment("版本");
             });
 
+            modelBuilder.Entity<KxsShopOrderReturnLog>(entity =>
+            {
+                entity.ToTable("kxs_shop_order_return_log");
+
+                entity.HasComment("订单返还记录表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnName("id")
+                    .HasComment("主键ID");
+
+                entity.Property(e => e.Amount)
+                    .HasColumnName("amount")
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("操作金额");
+
+                entity.Property(e => e.CreateTime)
+                    .HasColumnName("create_time")
+                    .HasColumnType("datetime")
+                    .HasComment("新增时间");
+
+                entity.Property(e => e.DelFlag)
+                    .HasColumnName("del_flag")
+                    .HasComment("删除标记,0未删除,1已删除");
+
+                entity.Property(e => e.Kind)
+                    .HasColumnName("kind")
+                    .HasColumnType("varchar(6)")
+                    .HasComment("日志类型 add新增 sub减少")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.OrderId)
+                    .HasColumnName("order_id")
+                    .HasComment("订单ID");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnName("remark")
+                    .HasColumnType("varchar(128)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UpdateTime)
+                    .HasColumnName("update_time")
+                    .HasColumnType("datetime")
+                    .HasComment("更新时间");
+
+                entity.Property(e => e.UserCode)
+                    .HasColumnName("user_code")
+                    .HasColumnType("varchar(30)")
+                    .HasComment("创客编号")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnName("user_id")
+                    .HasComment("用户ID");
+
+                entity.Property(e => e.VariationCause)
+                    .HasColumnName("variation_cause")
+                    .HasColumnType("varchar(255)")
+                    .HasComment("原因")
+                    .HasCharSet("utf8mb3")
+                    .HasCollation("utf8mb3_general_ci");
+
+                entity.Property(e => e.VariationType)
+                    .HasColumnName("variation_type")
+                    .HasComment("金额类型");
+
+                entity.Property(e => e.Version)
+                    .HasColumnName("version")
+                    .HasComment("版本");
+            });
+
             modelBuilder.Entity<KxsTicket>(entity =>
             {
                 entity.ToTable("kxs_ticket");

+ 1 - 0
PxcModels/LeaderCompTmp.cs

@@ -9,5 +9,6 @@ namespace MySystem.PxcModels
         public string EveryMonthData { get; set; }
         public string ParentNav { get; set; }
         public int ParentUserId { get; set; }
+        public int LeaderType { get; set; }
     }
 }

+ 1 - 1
PxcModels/PosFeeWarningRecord.cs

@@ -7,6 +7,7 @@ namespace MySystem.PxcModels
     {
         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; }
@@ -22,7 +23,6 @@ namespace MySystem.PxcModels
         public string PosSn { get; set; }
         public int BrandId { get; set; }
         public int PosId { get; set; }
-        public int QueryCount { get; set; }
         public DateTime? DoDate { get; set; }
     }
 }

+ 2 - 2
PxcModels/UserRankWhiteSetRecord.cs

@@ -11,6 +11,8 @@ namespace MySystem.PxcModels
         public int Version { get; set; }
         public DateTime? CreateDate { get; set; }
         public DateTime? UpdateDate { get; set; }
+        public string Remark { get; set; }
+        public int UserType { get; set; }
         public int BeforeLevel { get; set; }
         public DateTime? ExpireDate { get; set; }
         public DateTime? PresetDate { get; set; }
@@ -18,7 +20,5 @@ namespace MySystem.PxcModels
         public int Level { get; set; }
         public int SetType { get; set; }
         public int UserId { get; set; }
-        public int UserType { get; set; }
-        public string Remark { get; set; }
     }
 }

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 523 - 82
PxcModels/WebCMSEntities.cs


+ 1 - 0
Startup.cs

@@ -184,6 +184,7 @@ namespace MySystem
                 SycnSpUnBindService.Instance.Start(); //同步SP解绑数据
                 SycnSpMerchantRecordService.Instance.Start(); //同步SP商户记录数据
                 WifiTradeHelper.Instance.Start(); //每月1号统计上月wifi交易
+                WifiCheckHelper.Instance.Start(); //每月最后一天统计上月有效wifi
                 WifiUnBindHelper.Instance.Start(); //wifi解绑
                 WifiRefundHelper.Instance.Start(); //wifi退款
                 WifiChangeBindHelper.Instance.Start(); //wifi换绑

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است