Browse Source

wifi交易推送问题

lcl 1 year ago
parent
commit
9c7b38b000
1 changed files with 3 additions and 3 deletions
  1. 3 3
      AppStart/Helper/SycnSpServer/SycnSpTradeWifiService.cs

+ 3 - 3
AppStart/Helper/SycnSpServer/SycnSpTradeWifiService.cs

@@ -32,7 +32,7 @@ namespace MySystem
                     DateTime start = DateTime.Now.AddDays(-10);
                     DateTime end = DateTime.Now.AddMinutes(-1);
                     int StartId = int.Parse(function.CheckInt(function.ReadInstance("/SycnSp/TradeRecordId.txt")));
-                    IQueryable<TradeRecord> trades = spdb.TradeRecord.Where(m => m.Id == 132380123).OrderBy(m => m.CreateDate).Take(20);
+                    IQueryable<TradeRecord> trades = spdb.TradeRecord.Where(m => m.Id >= StartId && m.ProductType == "23" && m.CreateDate >= start && m.Status == 1).OrderBy(m => m.CreateDate).Take(20);
                     foreach (TradeRecord trade in trades.ToList())
                     {
                         //推送数据给java
@@ -40,6 +40,7 @@ namespace MySystem
                         bool check = db.SpOrderNos.Any(m => m.OrderNo == trade.TradeSerialNo);
                         if (!check && trade.SerEntryMode != "1")
                         {
+                            int BrandId = int.Parse(function.CheckInt(trade.ProductType));
                             decimal TradeAmount = trade.TradeAmount;
                             if(trade.SeoTitle != "v2") TradeAmount = TradeAmount / 100;
                             bool statFlag = false;
@@ -52,7 +53,7 @@ namespace MySystem
                                 UpdateDate = trade.UpdateDate,
                                 SnNo = trade.TradeSnNo, //渠道SN号
                                 TradeAmount = TradeAmount, //交易金额
-                                BrandId = pos.BrandId, //品牌
+                                BrandId = BrandId, //品牌
                                 Remark = trade.MerNo, //备注
                             }).Entity;
                             db.SpOrderNos.Add(new PxcModels.SpOrderNos()
@@ -63,7 +64,6 @@ namespace MySystem
 
                             //开始统计
                             int Months = 0;
-                            int BrandId = int.Parse(function.CheckInt(trade.ProductType));
 
                             if(trade.SeoTitle == "v2")
                             {