Selaa lähdekoodia

wifi押金更新

lcl 2 vuotta sitten
vanhempi
commit
82619844ba

+ 8 - 1
AppStart/Helper/StatService.cs

@@ -2137,7 +2137,14 @@ namespace MySystem
                 string start = date + " 00:00:00";
                 string end = DateTime.Parse(date).AddDays(1).ToString("yyyy-MM-dd") + " 00:00:00";
                 CustomerSqlConn.op("insert into PosMerchantTradeSummay (MerchantId,BrandId,TradeDate,TradeMonth,TradeAmount,CreateDate)  select *,now() from (select MerchantId,BrandId,DATE_FORMAT(CreateDate,'%Y%m%d') as TradeDate,DATE_FORMAT(CreateDate,'%Y%m') as TradeMonth,sum(TradeAmount) as TradeAmount from TradeRecord where Id>=13000000 and CreateDate>='" + start + "' and CreateDate<'" + end + "' and ActStatus=1 and BrandId!=14 group by MerchantId,BrandId,DATE_FORMAT(CreateDate,'%Y%m%d'),TradeDate,DATE_FORMAT(CreateDate,'%Y%m') order by MerchantId,BrandId,DATE_FORMAT(CreateDate,'%Y%m%d')) tb", MysqlConn.SqlConnStr);
-
+                SpModels.WebCMSEntities spdb = new SpModels.WebCMSEntities();
+                WebCMSEntities db = new WebCMSEntities();
+                DateTime s = DateTime.Parse(DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") + " 00:00:00");
+                DateTime e = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00");
+                int StartId = int.Parse(function.CheckInt(function.ReadInstance("/SycnSp/TradeRecordId.txt")));
+                IQueryable<SpModels.TradeRecord> trades = spdb.TradeRecord.Where(m => m.Id >= StartId && m.ProductType == "23" && m.CreateDate >= s && m.Status == 1).OrderBy(m => m.CreateDate).Take(20);
+                foreach (SpModels.TradeRecord trade in trades.ToList())
+                {}
             }
             catch (Exception ex)
             {

+ 20 - 4
AppStart/Helper/SycnSpServer/SycnSpMerchantService.cs

@@ -187,10 +187,26 @@ namespace MySystem
                                 if(pos.BrandId >= 23 && pos.BrandId <= 26)
                                 {
                                     decimal Prize = 0;
-                                    if(pos.BrandId == 23) pos.SeoKeyword = "30";
-                                    if(pos.BrandId == 24) pos.SeoKeyword = "120";
-                                    if(pos.BrandId == 25) pos.SeoKeyword = "200";
-                                    if(pos.BrandId == 26) pos.SeoKeyword = "750";
+                                    if(pos.BrandId == 23)
+                                    {
+                                        pos.SeoKeyword = "30";
+                                        pos.PrizeParams = "30";
+                                    }
+                                    if(pos.BrandId == 24)
+                                    {
+                                        pos.SeoKeyword = "120";
+                                        pos.PrizeParams = "120";
+                                    }
+                                    if(pos.BrandId == 25)
+                                    {
+                                        pos.SeoKeyword = "200";
+                                        pos.PrizeParams = "200";
+                                    }
+                                    if(pos.BrandId == 26)
+                                    {
+                                        pos.SeoKeyword = "750";
+                                        pos.PrizeParams = "750";
+                                    }
 
                                     pos.ActivationState = 1;
                                     pos.ActivationTime = DateTime.Now;

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

@@ -27,7 +27,6 @@ namespace MySystem
             {
                 try
                 {
-                    List<string> BrandIds = new List<string>();
                     WebCMSEntities spdb = new WebCMSEntities();
                     PxcModels.WebCMSEntities db = new PxcModels.WebCMSEntities();
                     DateTime start = DateTime.Now.AddDays(-10);