瀏覽代碼

调整wifi入库逻辑

lcl 10 月之前
父節點
當前提交
9b7160497a
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      AppStart/Helper/SycnSpServer/SycnSpTradeWifiService.cs

+ 8 - 1
AppStart/Helper/SycnSpServer/SycnSpTradeWifiService.cs

@@ -91,9 +91,16 @@ namespace MySystem
                                 for (int i = 1; i <= Months; i++)
                                 {
                                     StartMonth = StartMonth.AddMonths(1);
-                                    StatTrade(db, pos.BuyUserId, pos.BrandId, TradeMonth, TradeAmt);
+                                    StatTrade(db, pos.BuyUserId, pos.BrandId, StartMonth.ToString("yyyyMM"), TradeAmt);
                                 }
                             }
+
+                            TradeRecord edit = spdb.TradeRecord.FirstOrDefault(m => m.Id == trade.Id);
+                            if (edit != null)
+                            {
+                                edit.Status = 2;
+                                spdb.SaveChanges();
+                            }
                             
                         }
                     }