|
@@ -58,17 +58,70 @@ namespace MySystem
|
|
|
|
|
|
public void ActiveReward()
|
|
|
{
|
|
|
- try
|
|
|
+ while(true)
|
|
|
{
|
|
|
- dosomething3();
|
|
|
- activePrizeWithoutDeposit();
|
|
|
- activePrizeWithoutDeposit12();
|
|
|
+ try
|
|
|
+ {
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + ":start", "实时处理激活奖励");
|
|
|
+ dosomething3();
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + ":end\n\n", "实时处理激活奖励");
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + ":" + ex.ToString(), "实时处理激活奖励异常");
|
|
|
+ }
|
|
|
+ Thread.Sleep(30000);
|
|
|
}
|
|
|
- catch (Exception ex)
|
|
|
+ }
|
|
|
+
|
|
|
+ public void StartActiveReward1()
|
|
|
+ {
|
|
|
+ Thread th = new Thread(ActiveReward1);
|
|
|
+ th.IsBackground = true;
|
|
|
+ th.Start();
|
|
|
+ }
|
|
|
+
|
|
|
+ public void ActiveReward1()
|
|
|
+ {
|
|
|
+ while(true)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + ":start", "实时处理0押激活奖励");
|
|
|
+ activePrizeWithoutDeposit();
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + ":end\n\n", "实时处理0押激活奖励");
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + ":" + ex.ToString(), "实时处理0押激活奖励异常");
|
|
|
+ }
|
|
|
+ Thread.Sleep(30000);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void StartActiveReward2()
|
|
|
+ {
|
|
|
+ Thread th = new Thread(ActiveReward2);
|
|
|
+ th.IsBackground = true;
|
|
|
+ th.Start();
|
|
|
+ }
|
|
|
+
|
|
|
+ public void ActiveReward2()
|
|
|
+ {
|
|
|
+ while(true)
|
|
|
{
|
|
|
- function.WriteLog(DateTime.Now.ToString() + ":" + ex.ToString(), "实时处理激活记录异常");
|
|
|
+ try
|
|
|
+ {
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + ":start", "实时处理盒易付0押激活奖励");
|
|
|
+ activePrizeWithoutDeposit12();
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + ":end\n\n", "实时处理盒易付0押激活奖励");
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + ":" + ex.ToString(), "实时处理盒易付0押激活奖励异常");
|
|
|
+ }
|
|
|
+ Thread.Sleep(30000);
|
|
|
}
|
|
|
- Thread.Sleep(30000);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -222,7 +275,7 @@ namespace MySystem
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
|
DateTime yesterday = DateTime.Now.AddDays(-1);
|
|
|
DateTime today = DateTime.Now;
|
|
|
- IQueryable<PosMachinesTwo> posList = db.PosMachinesTwo.Where(m => m.ActivationState == 1 && !string.IsNullOrEmpty(m.SeoKeyword));
|
|
|
+ IQueryable<PosMachinesTwo> posList = db.PosMachinesTwo.Where(m => m.ActivationState == 1 && !string.IsNullOrEmpty(m.SeoKeyword) && m.Detail != "1");
|
|
|
if (posid > 0)
|
|
|
{
|
|
|
posList = posList.Where(m => m.Id == posid);
|
|
@@ -290,6 +343,12 @@ namespace MySystem
|
|
|
doActiveReward(db, merchant, pos, GetUserId, ParentNav, TopUserId, 50);
|
|
|
}
|
|
|
}
|
|
|
+ PosMachinesTwo edit = db.PosMachinesTwo.FirstOrDefault(m => m.Id == pos.Id);
|
|
|
+ if(edit != null)
|
|
|
+ {
|
|
|
+ edit.Detail = "1";
|
|
|
+ db.SaveChanges();
|
|
|
+ }
|
|
|
}
|
|
|
// }
|
|
|
}
|
|
@@ -321,7 +380,7 @@ namespace MySystem
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
|
DateTime yesterday = DateTime.Now.AddDays(-1);
|
|
|
DateTime today = DateTime.Now.AddMinutes(-5);
|
|
|
- IQueryable<PosMachinesTwo> posList = db.PosMachinesTwo.Where(m => m.ActivationState == 1 && string.IsNullOrEmpty(m.SeoKeyword) && m.BrandId != 12);
|
|
|
+ IQueryable<PosMachinesTwo> posList = db.PosMachinesTwo.Where(m => m.ActivationState == 1 && string.IsNullOrEmpty(m.SeoKeyword) && m.BrandId != 12 && m.Detail != "1");
|
|
|
if (posid > 0)
|
|
|
{
|
|
|
posList = posList.Where(m => m.Id == posid);
|
|
@@ -359,6 +418,12 @@ namespace MySystem
|
|
|
//金控活动机返奖励
|
|
|
doJk30(db, pos, merchant, GetUserId, ParentNav, TopUserId);
|
|
|
}
|
|
|
+ PosMachinesTwo edit = db.PosMachinesTwo.FirstOrDefault(m => m.Id == pos.Id);
|
|
|
+ if(edit != null)
|
|
|
+ {
|
|
|
+ edit.Detail = "1";
|
|
|
+ db.SaveChanges();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -370,7 +435,7 @@ namespace MySystem
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
|
DateTime yesterday = DateTime.Now.AddDays(-30);
|
|
|
DateTime today = DateTime.Now.AddMinutes(-5);
|
|
|
- IQueryable<PosMachinesTwo> posList = db.PosMachinesTwo.Where(m => m.ActivationState == 1 && string.IsNullOrEmpty(m.SeoKeyword) && (m.BrandId == 12 || m.BrandId == 13));
|
|
|
+ IQueryable<PosMachinesTwo> posList = db.PosMachinesTwo.Where(m => m.ActivationState == 1 && string.IsNullOrEmpty(m.SeoKeyword) && (m.BrandId == 12 || m.BrandId == 13) && m.Detail != "1");
|
|
|
if (posid > 0)
|
|
|
{
|
|
|
posList = posList.Where(m => m.Id == posid);
|
|
@@ -438,6 +503,12 @@ namespace MySystem
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ PosMachinesTwo item = db.PosMachinesTwo.FirstOrDefault(m => m.Id == pos.Id);
|
|
|
+ if(item != null)
|
|
|
+ {
|
|
|
+ item.Detail = "1";
|
|
|
+ db.SaveChanges();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -450,6 +521,7 @@ namespace MySystem
|
|
|
bool check1 = db.ActiveReward.Any(m => m.KqSnNo == pos.PosSn && m.RewardAmount == ActPrize);
|
|
|
if (!check && !check1)
|
|
|
{
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + ":" + pos.PosSn, "实时处理激活奖励");
|
|
|
Users machineUser = db.Users.FirstOrDefault(m => m.Id == pos.BuyUserId) ?? new Users();
|
|
|
db.ActiveReward.Add(new ActiveReward()
|
|
|
{
|