浏览代码

金控换通道设置服务费

lcl 6 月之前
父节点
当前提交
dc8b4c5831

二进制
.DS_Store


+ 39 - 16
AppStart/Helper/ChangePosFeeUtil.cs

@@ -1,9 +1,9 @@
-using MySystem.Models;
 using Library;
 using System.Collections.Generic;
 using System;
 using System.Linq;
 using LitJson;
+using MySystem.PxcModels;
 namespace MySystem
 {
     /// <summary>
@@ -36,26 +36,49 @@ namespace MySystem
                 {
                     return "机具" + pos.PosSn + "已设置押金,请勿重复设置";
                 }
-                function.WriteLog(DateTime.Now.ToString() + ":请求参数," + pos.PosSn + ":" + DepositId, "金控-设置押金-返回报文");
-                string content = function.GetWebRequest("http://sp.kexiaoshuang.com/api/test/SetDeposit?sn=" + pos.PosSn + "&num=" + DepositId);
-                function.WriteLog(DateTime.Now.ToString() + "\n" + content, "金控-设置押金-返回报文");
-                if (content == "fail")
+                //判断是否存在关联数据
+                string content = "";
+                PosMachineOther otherPos = db.PosMachineOther.FirstOrDefault(m => m.Id == pos.Id);
+                if(otherPos != null)
                 {
-                    return "机具" + pos.PosSn + "设置失败";
+                    function.WriteLog(DateTime.Now.ToString() + ":请求参数," + pos.PosSn + ":" + DepositId, "金控-设置押金-返回报文");
+                    content = PublicImportDataService.Instance.LkbSetDeposit(pos.PosSn, decimal.Parse(DepositId));
+                    function.WriteLog(DateTime.Now.ToString() + "\n" + content, "金控-设置押金-返回报文");
+                    if (content == "fail")
+                    {
+                        return "机具" + pos.PosSn + "设置失败";
+                    }
+                    JsonData jsonObj = JsonMapper.ToObject(content);
+                    content = jsonObj["data"].ToString();
+                    content = PublicImportDataService.Instance.Decrypt(content);
+                    if (jsonObj["respCode"].ToString() != "00")
+                    {
+                        return jsonObj["respMsg"].ToString();
+                    }
                 }
-                JsonData jsonObj = JsonMapper.ToObject(content);
-                if (jsonObj["code"].ToString() != "000000")
+                else
                 {
-                    return jsonObj["message"].ToString();
+                    function.WriteLog(DateTime.Now.ToString() + ":请求参数," + pos.PosSn + ":" + DepositId, "金控-设置押金-返回报文");
+                    content = function.GetWebRequest("http://sp.kexiaoshuang.com/api/test/SetDeposit?sn=" + pos.PosSn + "&num=" + DepositId);
+                    function.WriteLog(DateTime.Now.ToString() + "\n" + content, "金控-设置押金-返回报文");
+                    if (content == "fail")
+                    {
+                        return "机具" + pos.PosSn + "设置失败";
+                    }
+                    JsonData jsonObj = JsonMapper.ToObject(content);
+                    if (jsonObj["code"].ToString() != "000000")
+                    {
+                        return jsonObj["message"].ToString();
+                    }
+                    content = jsonObj["data"].ToString();
+                    content = PublicImportDataService.Instance.Decrypt(content);
+                    JsonData contentObj = JsonMapper.ToObject(content);
+                    if (contentObj["respCode"].ToString() != "00")
+                    {
+                        return contentObj["respMsg"].ToString();
+                    }
                 }
-                content = jsonObj["data"].ToString();
-                content = PublicImportDataService.Instance.Decrypt(content);
                 function.WriteLog(DateTime.Now.ToString() + "\n" + content, "金控-设置押金-返回报文");
-                JsonData contentObj = JsonMapper.ToObject(content);
-                if (contentObj["respCode"].ToString() != "00")
-                {
-                    return contentObj["respMsg"].ToString();
-                }
                 var BeforeDeposit = 0;
                 if (string.IsNullOrEmpty(pos.PrizeParams))
                 {

+ 118 - 0
AppStart/Helper/PublicImportDataService.cs

@@ -1101,6 +1101,124 @@ namespace MySystem
 
         #endregion
 
+        
+        #region 来客吧L版
+        // 生产环境
+        string lkbClientId = "80000177";
+        string lkbMfe88PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3YYYwaQyl+poYl+CQEFiLjQi7R0LEG73360Wup4frAy0zPZYlch3MwUChA7gPXVND/bUY+6vzJ3mkeoFvFtOkhrV0Wm8PWWnBVzanq3P91rFqMljMQlNxz4nBNeH2yHX9lCf6HQCYfjsYtadrGyUQw3ZMs+b0sMI2nZe/oKZo1wIDAQAB";
+        string lkbClientPublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3YYYwaQyl+poYl+CQEFiLjQi7R0LEG73360Wup4frAy0zPZYlch3MwUChA7gPXVND/bUY+6vzJ3mkeoFvFtOkhrV0Wm8PWWnBVzanq3P91rFqMljMQlNxz4nBNeH2yHX9lCf6HQCYfjsYtadrGyUQw3ZMs+b0sMI2nZe/oKZo1wIDAQAB";
+        string lkbClientPrivateKey = "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBALdhhjBpDKX6mhiX4JAQWIuNCLtHQsQbvffrRa6nh+sDLTM9liVyHczBQKEDuA9dU0P9tRj7q/MneaR6gW8W06SGtXRabw9ZacFXNqerc/3WsWoyWMxCU3HPicE14fbIdf2UJ/odAJh+Oxi1p2sbJRDDdkyz5vSwwjadl7+gpmjXAgMBAAECgYA4+QKgvbJhSsdfRqhM+dcYnBuPW6dhmCDgCmdeyMvQdu8vET45qgeaGpxCqg4gL+VzpToDZgVZCPWg5TKbWeMsnjHJ4o3e/SYywRufHGDougTjYQcc4jZLjbefbGAbRIoSdZcYoJS9SOlFsSTyk5zkNmvFvxDH1mlw7ooYFmEi8QJBAO5vs6+wxuEwrYxm/y7tRuOUuIRuHv/HfRRPwTZUJMwR7YeQJ8HqWPZr8QukiE2YL+j7pEy/zscgW6tmAZzbNskCQQDE455wVPoWxFADaQvzrksWGF0qEce1ppnqf8DoHHQYQtUF3z8art/Kg8wJ/GbZxytR2REZzzaeqw3uGFyn21KfAkB44QZelqds+OmzGXBbkQ10SSx2bwGmOLNvvbM9YNE66AfcxzdwtucdHsIYXfSAKhx36EN2aXNiPkRbE57Tr8sJAkACPPgrHLwvEBI8x6/sGDogSSyd8s/LX9Z2FPeza8diEzhqtav4+K3wlmj2YBknNp1mc8o++d0MFrO01jAPdG3PAkBvAD3lZvd4m10Q92ikomH79IeQRh5mEBxfUsDXk+khHzjONmYgpo46TQBZ1okNW0amIemQhBbs/bEZZUGukPdn";
+        string lkbReqUrl = "https://fire-api.mfe88.com/channel-app/api/terminal/serviceFeeSet";
+        string lkbReqUrl2 = "https://fire-api.mfe88.com/channel-app/api/rate/update";
+        
+        public bool LkbVerify()
+        {
+            string data = "ZV0BBQ2hNgeZKKAPZ3XXEJGhp/h3+Mq5ejxuCI9SRbrDRls0XtfJRWboT5+J1sfHkb/J3eI4ThkTI/DjRNLK4x7fFYD62coClL7zDXeES42RXrpBik7VHHllUIS5nZFT23QME8kxRdo/6FH7Sv0J7IP5Qtqe70b3syv1jXmv8JozoP6DQjqHnlggpRM+4Ppks5PXorvHW7yI3uOgJL06t0GWDZIh7FRQ6UU41ayDsY0Z8j9o5quD8DSGJ1po6YPdmr2FpbFL5hs+buYhfEwsOwbvU5Aawbt+XuNXlU21wjeyC/8h2/yiPJSpCGjNXzzY4BBIhWDIbyxrbV+7SGIC+gNK2oQV0Ldtq9dXmljqA8e2dWsa8IaGaXmfo/85Ef2W5qIByrn42K+rA1nzhbR+L0WPGd4ugyzx6eiUl6T0oXVMaTIIoM6fndrm7RubsfNRZizrkQ+ocnAraMnGPZq84NpRp0Qs+pg8mlAIrqQ0avDutY1jGkzFXAljYGhiPvN7ntydmn2P2jgiPfh65VWumcXU+cp8d/nTD8eT/HmVbXUNMp/1ckP+VoK2wdowvgmgAruD3Fjfo8EghAfWEfuAVIsErxGxKCF17AUI8ZIqa+JYxxaA9vjxklavLmB9MAovx3JQSGXqXNNTy3LBljb1dZr3yk0ER9Qv8K4Bqc7Ti6gHHBFc7uu+wnqD7kTieMn++TpNo44MR8tGSmN6lzZKrio1czTyLLANLzzH4lBipTalGjgFnKcaNdVloW63DKkpz3qugCeBotRDdkH3T7DtYVz41lmJyLlxToeyFxXzqV0yqopR62QIghRO/vI9DpMDJclQMKEaCs9Py4qgMz2BmTqnESU42XDyNCMY5JVGpClZJgXNPmWLU0xrOu7B/tMEfThj9pNPBqNkbWQkLZ1MaSiMrfoHfQ7krt6TV6B2rhyfwrjKysXex4IHUX0nRTT55HcqQc38FlpeC4+kaTTSRs0HGMteiq+3BfDY0vHxH84x22WeN7oE7JbD/Ttd6Tn4";
+            string signString = "cuo8Rp0Hhc1pzEkzvx3tlGV6aBhZoD3F+b1FM07IkCTQwTVzz0EzgO0auQt+Wqf9ndWERa7P9jTqHS4JKYQH+LGLXjVgQPekzrePNnIcVVFqjf3VC+xImxSxJLaChHxiF+ufDpU9symoesub51QRCPSUB3xuQ2uP2lSbVmgcjvw=";
+            var toDecryptArray = Convert.FromBase64String(data);
+            var toSignArray = Convert.FromBase64String(signString);
+            var rsa = RSA.Create();
+            rsa.ImportRSAPublicKey(Convert.FromBase64String(lkbMfe88PublicKey), out _);
+            return rsa.VerifyData(toDecryptArray, toSignArray, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
+        }
+        private byte[] LkbStrToToHexByte(string hexString)
+        {
+            hexString = hexString.Replace(" ", "");
+            if ((hexString.Length % 2) != 0)
+                hexString += " ";
+            byte[] returnBytes = new byte[hexString.Length / 2];
+            for (int i = 0; i < returnBytes.Length; i++)
+                returnBytes[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16);
+            return returnBytes;
+        }
+
+        public string LkbDecrypt(string data)
+        {
+            var toDecryptArray = Convert.FromBase64String(data);
+            var rsa2 = RSA.Create();
+            rsa2.ImportPkcs8PrivateKey(Convert.FromBase64String(lkbClientPrivateKey), out _);
+            string result = "";
+            List<byte> cache = new List<byte>();
+            for (int i = 0; i < toDecryptArray.Length; i++)
+            {
+                cache.Add(toDecryptArray[i]);
+                if ((i + 1) % 128 == 0 || i + 1 == toDecryptArray.Length)
+                {
+                    var ContentArray = rsa2.Decrypt(cache.ToArray(), RSAEncryptionPadding.Pkcs1);
+                    result += System.Text.Encoding.UTF8.GetString(ContentArray);
+                    cache.Clear();
+                }
+            }
+            return result;
+        }
+        public string LkbSetDeposit(string sn, decimal serviceFee)
+        {
+            serviceFee = serviceFee * 100;
+            Dictionary<string, string> headers = new Dictionary<string, string>();
+            headers.Add("X-Client", lkbClientId);
+            headers.Add("X-Security", "RSA");
+            DateTimeOffset currentTime = DateTimeOffset.UtcNow;
+            string rfc1123FormattedTime = currentTime.ToString("r");
+            headers.Add("X-Time", rfc1123FormattedTime);
+            headers.Add("X-Trace", function.get_Random(32));
+            string content = "{\"factorySequenceNo\":\"" + sn + "\",\"serviceFee\":\"" + serviceFee.ToString("f0") + "\",\"agencyNo\":\"" + lkbClientId + "\"}";
+            content = LkbEncrypt(content);
+            string signstr = LkbSign(content);
+            headers.Add("X-Sign", signstr);
+            string req = "{\"param\":\"" + content + "\"}";
+            string result = function.PostWebRequest(lkbReqUrl, req, headers, "application/json");
+            return result;
+        }
+        // public string LkbSetFee(string sn, decimal fee = 0.6M)
+        // {
+        //     List<SetDepositList> rateDOs = new List<SetDepositList>();
+        //     rateDOs.Add(new SetDepositList()
+        //     {
+        //         productSubType = "2020032007vz7Ux6",
+        //         updateValue = fee,
+        //         updateType = 0
+        //     });
+        //     Dictionary<string, string> headers = new Dictionary<string, string>();
+        //     headers.Add("X-Client-ID", lkbClientId);
+        //     headers.Add("X-Security", "RSA");
+        //     Dictionary<string, object> obj = new Dictionary<string, object>();
+        //     obj.Add("factorySequenceNo", sn);
+        //     obj.Add("productCode", 2);
+        //     obj.Add("productName", 2);
+        //     obj.Add("rateDOs", rateDOs);
+        //     string content = Newtonsoft.Json.JsonConvert.SerializeObject(obj);
+        //     content = LkbEncrypt2(content);
+        //     string signstr = LkbSign(content);
+        //     headers.Add("X-Sign", signstr);
+        //     string req = "{\"param\":\"" + content + "\"}";
+        //     string result = function.PostWebRequest(lkbReqUrl2, req, headers, "application/json");
+        //     return result;
+        // }
+        public string LkbEncrypt(string data)
+        {
+            return new RSAHelper(RSAType.RSA, System.Text.Encoding.UTF8, "", lkbMfe88PublicKey).Encrypt(data);
+        }
+
+        public string LkbEncrypt2(string data)
+        {
+            return new RSAHelper(RSAType.RSA, System.Text.Encoding.UTF8, "", lkbMfe88PublicKey).Encrypt(data);
+        }
+        public string LkbSign(string data)
+        {
+            var toEncryptArray = System.Text.Encoding.UTF8.GetBytes(data);
+            var rsa = RSA.Create();
+            rsa.ImportPkcs8PrivateKey(Convert.FromBase64String(lkbClientPrivateKey), out _);
+            string result = "";
+            var buffer = rsa.SignData(toEncryptArray, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
+            result = Convert.ToBase64String(buffer);
+            return result;
+            // return new RSAHelper(RSAType.RSA, System.Text.Encoding.UTF8, clientPrivateKey, "").Sign(data);
+        }
+        #endregion
+
+
+
+
     
     }
 }

+ 2 - 1
Controllers/HomeController.cs

@@ -69,7 +69,8 @@ namespace MySystem.Controllers
             // return PublicImportDataService.Instance.QueryLiSDeposit("N00000D0022G499", "");
             // {"existsFlag":"1","feeList":[{"feeCalcType":"M1","fixed":"0","rate":"0.24"},{"feeCalcType":"M2","fixed":"0","rate":"0.24"},{"feeCalcType":"M3","fixed":"0","rate":"0.38"},{"feeCalcType":"M4","fixed":"0","rate":"2.63"},{"feeCalcType":"M5","fixed":"0","rate":"0.63"},{"feeCalcType":"M7","fixed":"0"},{"feeCalcType":"M8","fixed":"0"},{"feeCalcType":"M9","fixed":"0"},{"feeCalcType":"T0","fixed":"1","rate":"300"}],"merchNo":"N00000D0022G499","ret_code":"00","ret_msg":"请求成功"}
 
-            return PublicImportDataService.Instance.SetLiSWeFee("WME52S0151221", "N00000C05U77807", "0.63", "300");
+            // return PublicImportDataService.Instance.SetLiSWeFee("WME52S0151221", "N00000C05U77807", "0.63", "300");
+            return PublicImportDataService.Instance.LkbSetDeposit("00003102702301319425328", 99);
         }
         
     

+ 14 - 0
PxcModels/JavaApiSet.cs

@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class JavaApiSet
+    {
+        public int Id { get; set; }
+        public string ToApiHost { get; set; }
+        public string ToApiUrl { get; set; }
+        public string SourceApiUrl { get; set; }
+        public string ApiName { get; set; }
+    }
+}

+ 15 - 0
PxcModels/JavaApiSetFields.cs

@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class JavaApiSetFields
+    {
+        public int Id { get; set; }
+        public string TargetFieldType { get; set; }
+        public string TargetFieldName { get; set; }
+        public string SourceFieldTitle { get; set; }
+        public string SourceFieldName { get; set; }
+        public int ApiId { get; set; }
+    }
+}

+ 12 - 0
PxcModels/NewLeaderData.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class NewLeaderData
+    {
+        public int UserId { get; set; }
+        public decimal BalanceAmount { get; set; }
+        public decimal ReserveAmount { get; set; }
+    }
+}

+ 27 - 0
PxcModels/PosCouponExchangeRecord.cs

@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class PosCouponExchangeRecord
+    {
+        public int Id { get; set; }
+        public int Sort { get; set; }
+        public int Status { get; set; }
+        public int Version { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string Note { get; set; }
+        public int ToCount { get; set; }
+        public int SourceCount { get; set; }
+        public string ToCoupons { get; set; }
+        public string SourceCoupons { get; set; }
+        public int UserId { get; set; }
+        public int QueryCount { 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; }
+    }
+}

+ 14 - 0
PxcModels/PosMachineOther.cs

@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class PosMachineOther
+    {
+        public int Id { get; set; }
+        public string CustomerNo { get; set; }
+        public string LeMerNo { get; set; }
+        public string LeMerNo4 { get; set; }
+        public int LeMerchantId { get; set; }
+    }
+}

+ 18 - 0
PxcModels/TradeFilterRecord.cs

@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class TradeFilterRecord
+    {
+        public int Id { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public decimal IntercetpAmount { get; set; }
+        public DateTime? OrderDate { get; set; }
+        public string OrderNo { get; set; }
+        public int OrderId { get; set; }
+        public int PrizeUserId { get; set; }
+        public int OrderUserId { get; set; }
+        public int Kind { get; set; }
+    }
+}

+ 289 - 1
PxcModels/WebCMSEntities.cs

@@ -71,6 +71,8 @@ namespace MySystem.PxcModels
         public virtual DbSet<HelpProfitRewardDetail> HelpProfitRewardDetail { get; set; }
         public virtual DbSet<HelpProfitUserTradeSummay> HelpProfitUserTradeSummay { get; set; }
         public virtual DbSet<IndexIconList> IndexIconList { get; set; }
+        public virtual DbSet<JavaApiSet> JavaApiSet { get; set; }
+        public virtual DbSet<JavaApiSetFields> JavaApiSetFields { get; set; }
         public virtual DbSet<KqProductBrand> KqProductBrand { get; set; }
         public virtual DbSet<KqProductOrgs> KqProductOrgs { get; set; }
         public virtual DbSet<KqProductRuleSet> KqProductRuleSet { get; set; }
@@ -128,6 +130,7 @@ namespace MySystem.PxcModels
         public virtual DbSet<MsgSms> MsgSms { get; set; }
         public virtual DbSet<MsgSmsSet> MsgSmsSet { get; set; }
         public virtual DbSet<MsgTemplate> MsgTemplate { get; set; }
+        public virtual DbSet<NewLeaderData> NewLeaderData { get; set; }
         public virtual DbSet<OpenBankCityTable> OpenBankCityTable { get; set; }
         public virtual DbSet<OpenBankTable> OpenBankTable { get; set; }
         public virtual DbSet<OpenReward> OpenReward { get; set; }
@@ -145,11 +148,13 @@ namespace MySystem.PxcModels
         public virtual DbSet<PageUpdateInfo> PageUpdateInfo { get; set; }
         public virtual DbSet<PosChannelSet> PosChannelSet { get; set; }
         public virtual DbSet<PosChannelSetRecord> PosChannelSetRecord { get; set; }
+        public virtual DbSet<PosCouponExchangeRecord> PosCouponExchangeRecord { 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<PosFeeWarningRecord> PosFeeWarningRecord { get; set; }
+        public virtual DbSet<PosMachineOther> PosMachineOther { get; set; }
         public virtual DbSet<PosMachines> PosMachines { get; set; }
         public virtual DbSet<PosMachinesFeeChangeRecord> PosMachinesFeeChangeRecord { get; set; }
         public virtual DbSet<PosMachinesTwo> PosMachinesTwo { get; set; }
@@ -256,6 +261,7 @@ namespace MySystem.PxcModels
         public virtual DbSet<TradeDaySummary2Before> TradeDaySummary2Before { get; set; }
         public virtual DbSet<TradeDaySummaryAfter> TradeDaySummaryAfter { get; set; }
         public virtual DbSet<TradeDaySummaryBefore> TradeDaySummaryBefore { get; set; }
+        public virtual DbSet<TradeFilterRecord> TradeFilterRecord { get; set; }
         public virtual DbSet<TradeRecord> TradeRecord { get; set; }
         public virtual DbSet<TradeRecordTest> TradeRecordTest { get; set; }
         public virtual DbSet<UpUserRelation> UpUserRelation { get; set; }
@@ -311,6 +317,7 @@ namespace MySystem.PxcModels
         public virtual DbSet<UserYearEndInCome> UserYearEndInCome { get; set; }
         public virtual DbSet<UserYearEndSummary> UserYearEndSummary { get; set; }
         public virtual DbSet<Users> Users { get; set; }
+        public virtual DbSet<WifiTradeRecord> WifiTradeRecord { get; set; }
 
         protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
         {
@@ -4212,6 +4219,72 @@ namespace MySystem.PxcModels
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<JavaApiSet>(entity =>
+            {
+                entity.HasComment("java接口对接");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ApiName)
+                    .HasColumnType("varchar(200)")
+                    .HasComment("接口名称")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SourceApiUrl)
+                    .HasColumnType("varchar(200)")
+                    .HasComment("来源地址")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ToApiHost)
+                    .HasColumnType("varchar(200)")
+                    .HasComment("接收主机头")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.ToApiUrl)
+                    .HasColumnType("varchar(200)")
+                    .HasComment("接收地址")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+            });
+
+            modelBuilder.Entity<JavaApiSetFields>(entity =>
+            {
+                entity.HasComment("java接口对接字段配置");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.ApiId)
+                    .HasColumnType("int(11)")
+                    .HasComment("父Id");
+
+                entity.Property(e => e.SourceFieldName)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("来源字段名")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SourceFieldTitle)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("来源字段说明")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TargetFieldName)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("对应字段名")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.TargetFieldType)
+                    .HasColumnType("varchar(20)")
+                    .HasComment("对应字段类型")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+            });
+
             modelBuilder.Entity<KqProductBrand>(entity =>
             {
                 entity.HasComment("产品品牌");
@@ -8731,6 +8804,26 @@ namespace MySystem.PxcModels
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<NewLeaderData>(entity =>
+            {
+                entity.HasKey(e => e.UserId)
+                    .HasName("PRIMARY");
+
+                entity.HasComment("新盟主体系数据");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnType("int(11)")
+                    .HasComment("创客Id");
+
+                entity.Property(e => e.BalanceAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("盟主可提现余额");
+
+                entity.Property(e => e.ReserveAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("盟主储蓄金");
+            });
+
             modelBuilder.Entity<OpenBankCityTable>(entity =>
             {
                 entity.HasKey(e => e.CityName)
@@ -10027,6 +10120,90 @@ namespace MySystem.PxcModels
                     .HasComment("修改时间");
             });
 
+            modelBuilder.Entity<PosCouponExchangeRecord>(entity =>
+            {
+                entity.HasComment("电签券兑换记录");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.CreateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Note)
+                    .HasColumnType("varchar(200)")
+                    .HasComment("备注")
+                    .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)")
+                    .HasComment("排序序号");
+
+                entity.Property(e => e.SourceCount)
+                    .HasColumnType("int(11)")
+                    .HasComment("来源券数量");
+
+                entity.Property(e => e.SourceCoupons)
+                    .HasColumnType("mediumtext")
+                    .HasComment("来源券")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Status)
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.ToCount)
+                    .HasColumnType("int(11)")
+                    .HasComment("兑换券数量");
+
+                entity.Property(e => e.ToCoupons)
+                    .HasColumnType("mediumtext")
+                    .HasComment("兑换券")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("修改时间");
+
+                entity.Property(e => e.UpdateMan)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.UserId)
+                    .HasColumnType("int(11)")
+                    .HasComment("创客");
+
+                entity.Property(e => e.Version)
+                    .HasColumnType("int(11)")
+                    .HasComment("版本号");
+            });
+
             modelBuilder.Entity<PosCouponForUser>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
@@ -10312,6 +10489,37 @@ namespace MySystem.PxcModels
                     .HasComment("版本号");
             });
 
+            modelBuilder.Entity<PosMachineOther>(entity =>
+            {
+                entity.HasComment("机具扩展表");
+
+                entity.Property(e => e.Id)
+                    .HasColumnType("int(11)")
+                    .HasComment("机具Id");
+
+                entity.Property(e => e.CustomerNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("客户号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.LeMerNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("乐刷商编")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.LeMerNo4)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("四方商编")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.LeMerchantId)
+                    .HasColumnType("int(11)")
+                    .HasComment("商户Id");
+            });
+
             modelBuilder.Entity<PosMachines>(entity =>
             {
                 entity.Property(e => e.Id).HasColumnType("int(11)");
@@ -10739,7 +10947,7 @@ namespace MySystem.PxcModels
                 entity.Property(e => e.MatchTime).HasColumnType("datetime");
 
                 entity.Property(e => e.MerIdcardNo)
-                    .HasColumnType("varchar(30)")
+                    .HasColumnType("varchar(18)")
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
@@ -18106,6 +18314,47 @@ namespace MySystem.PxcModels
                 entity.Property(e => e.VipFlag).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<TradeFilterRecord>(entity =>
+            {
+                entity.HasComment("训练营拦截记录");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.IntercetpAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("拦截金额");
+
+                entity.Property(e => e.Kind)
+                    .HasColumnType("int(11)")
+                    .HasComment("类别");
+
+                entity.Property(e => e.OrderDate)
+                    .HasColumnType("datetime")
+                    .HasComment("下单时间");
+
+                entity.Property(e => e.OrderId)
+                    .HasColumnType("int(11)")
+                    .HasComment("订单");
+
+                entity.Property(e => e.OrderNo)
+                    .HasColumnType("varchar(50)")
+                    .HasComment("订单号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.OrderUserId)
+                    .HasColumnType("int(11)")
+                    .HasComment("下单人");
+
+                entity.Property(e => e.PrizeUserId)
+                    .HasColumnType("int(11)")
+                    .HasComment("拦截奖励人");
+            });
+
             modelBuilder.Entity<TradeRecord>(entity =>
             {
                 entity.HasIndex(e => new { e.BrandId, e.UserId, e.MerchantId, e.MerNo, e.SnNo, e.CreateDate })
@@ -22029,6 +22278,45 @@ namespace MySystem.PxcModels
                 entity.Property(e => e.Version).HasColumnType("int(11)");
             });
 
+            modelBuilder.Entity<WifiTradeRecord>(entity =>
+            {
+                entity.HasComment("WIFI交易记录");
+
+                entity.Property(e => e.Id).HasColumnType("int(11)");
+
+                entity.Property(e => e.BrandId)
+                    .HasColumnType("int(11)")
+                    .HasComment("品牌");
+
+                entity.Property(e => e.CreateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("创建时间");
+
+                entity.Property(e => e.Remark)
+                    .HasColumnType("varchar(64)")
+                    .HasComment("备注")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.SnNo)
+                    .HasColumnType("varchar(32)")
+                    .HasComment("渠道SN号")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Status)
+                    .HasColumnType("int(11)")
+                    .HasComment("状态");
+
+                entity.Property(e => e.TradeAmount)
+                    .HasColumnType("decimal(18,2)")
+                    .HasComment("交易金额");
+
+                entity.Property(e => e.UpdateDate)
+                    .HasColumnType("datetime")
+                    .HasComment("修改时间");
+            });
+
             OnModelCreatingPartial(modelBuilder);
         }
 

+ 17 - 0
PxcModels/WifiTradeRecord.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.PxcModels
+{
+    public partial class WifiTradeRecord
+    {
+        public int Id { get; set; }
+        public int Status { get; set; }
+        public DateTime? CreateDate { get; set; }
+        public DateTime? UpdateDate { get; set; }
+        public string Remark { get; set; }
+        public int BrandId { get; set; }
+        public decimal TradeAmount { get; set; }
+        public string SnNo { get; set; }
+    }
+}

+ 6 - 6
Startup.cs

@@ -147,12 +147,12 @@ namespace MySystem
             }
             if(Library.ConfigurationManager.EnvironmentFlag == 2)
             {
-                SetFeeFlagService.Instance.Start(); //85天提前通知创客费率调升消息
-                SetDepositService.Instance.Start(); //调整费率(通知、标记)
-                SetDepositPostService.Instance.Start(); //提交支付公司设置费率接口
-                SetDepositPostService.Instance.StartKdb(); //监控开店宝费率设置结果
-                ChangePosFeeQueue.Instance.StartEverTime(); //设置服务费
-                SetSftFeeService.Instance.Start(); //盛付通420天费率加万2
+                // SetFeeFlagService.Instance.Start(); //85天提前通知创客费率调升消息
+                // SetDepositService.Instance.Start(); //调整费率(通知、标记)
+                // SetDepositPostService.Instance.Start(); //提交支付公司设置费率接口
+                // SetDepositPostService.Instance.StartKdb(); //监控开店宝费率设置结果
+                // ChangePosFeeQueue.Instance.StartEverTime(); //设置服务费
+                // SetSftFeeService.Instance.Start(); //盛付通420天费率加万2
             }
         }