|
|
@@ -89,7 +89,6 @@ namespace MySystem
|
|
|
{
|
|
|
function.WriteLog(DateTime.Now.ToString() + ":start", "实时处理0押激活奖励");
|
|
|
activePrizeWithoutDeposit();
|
|
|
- // activePrizeWithoutDeposit6();
|
|
|
function.WriteLog(DateTime.Now.ToString() + ":end\n\n", "实时处理0押激活奖励");
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
@@ -115,7 +114,6 @@ namespace MySystem
|
|
|
{
|
|
|
function.WriteLog(DateTime.Now.ToString() + ":start", "实时处理盒易付0押激活奖励");
|
|
|
activePrizeWithoutDeposit12();
|
|
|
- // activePrizeWithoutDeposit122();
|
|
|
function.WriteLog(DateTime.Now.ToString() + ":end\n\n", "实时处理盒易付0押激活奖励");
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
@@ -126,6 +124,31 @@ namespace MySystem
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public void StartActiveReward15()
|
|
|
+ {
|
|
|
+ Thread th = new Thread(ActiveReward15);
|
|
|
+ th.IsBackground = true;
|
|
|
+ th.Start();
|
|
|
+ }
|
|
|
+
|
|
|
+ public void ActiveReward15()
|
|
|
+ {
|
|
|
+ while(true)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + ":start", "实时处理来客吧0押激活奖励");
|
|
|
+ activePrizeWithoutDeposit15();
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + ":end\n\n", "实时处理来客吧0押激活奖励");
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ function.WriteLog(DateTime.Now.ToString() + ":" + ex.ToString(), "实时处理来客吧0押激活奖励异常");
|
|
|
+ }
|
|
|
+ Thread.Sleep(30000);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
//广电卡激活奖励
|
|
|
@@ -453,7 +476,7 @@ namespace MySystem
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
|
DateTime yesterday = DateTime.Now.AddDays(-1);
|
|
|
DateTime today = DateTime.Now.AddMinutes(-10);
|
|
|
- IQueryable<PosMachinesTwo> posList = db.PosMachinesTwo.Where(m => m.ActivationState == 1 && string.IsNullOrEmpty(m.SeoKeyword) && m.BrandId != 12 && m.BrandId != 13 && m.BrandId != 6 && m.BrandId != 14 && m.Detail != "1");
|
|
|
+ IQueryable<PosMachinesTwo> posList = db.PosMachinesTwo.Where(m => m.ActivationState == 1 && string.IsNullOrEmpty(m.SeoKeyword) && m.BrandId != 12 && m.BrandId != 13 && m.BrandId != 6 && m.BrandId != 14 && m.BrandId != 15 && m.BrandId != 16 && m.Detail != "1");
|
|
|
if (posid > 0)
|
|
|
{
|
|
|
posList = posList.Where(m => m.Id == posid);
|
|
|
@@ -585,6 +608,50 @@ namespace MySystem
|
|
|
db.Dispose();
|
|
|
}
|
|
|
|
|
|
+ public void activePrizeWithoutDeposit15(int posid = 0)
|
|
|
+ {
|
|
|
+ WebCMSEntities db = new WebCMSEntities();
|
|
|
+ DateTime yesterday = DateTime.Now.AddDays(-30);
|
|
|
+ DateTime today = DateTime.Now.AddHours(-1);
|
|
|
+ IQueryable<PosMachinesTwo> posList = db.PosMachinesTwo.Where(m => m.ActivationState == 1 && m.IsFirst == 1 && m.CreditTrade >= 5000 && string.IsNullOrEmpty(m.SeoKeyword) && (m.BrandId == 15 || m.BrandId == 16) && m.Detail != "1");
|
|
|
+ if (posid > 0)
|
|
|
+ {
|
|
|
+ posList = posList.Where(m => m.Id == posid);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ posList = posList.Where(m => m.ActivationTime >= yesterday && m.ActivationTime < today);
|
|
|
+ }
|
|
|
+ foreach (PosMachinesTwo pos in posList.ToList())
|
|
|
+ {
|
|
|
+ PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId);
|
|
|
+ if (merchant != null)
|
|
|
+ {
|
|
|
+ string ParentNav = "";
|
|
|
+ Users user = db.Users.FirstOrDefault(m => m.Id == pos.BuyUserId);
|
|
|
+ if (user != null)
|
|
|
+ {
|
|
|
+ int GetUserId = user.Id;
|
|
|
+ ParentNav = user.ParentNav;
|
|
|
+ int TopUserId = 0;
|
|
|
+ if (!string.IsNullOrEmpty(ParentNav))
|
|
|
+ {
|
|
|
+ TopUserId = int.Parse(ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
|
|
|
+ }
|
|
|
+ //首台无押金机返50
|
|
|
+ doActiveReward(db, merchant, pos, GetUserId, ParentNav, TopUserId, 50);
|
|
|
+ PosMachinesTwo item = db.PosMachinesTwo.FirstOrDefault(m => m.Id == pos.Id);
|
|
|
+ if(item != null)
|
|
|
+ {
|
|
|
+ item.Detail = "1";
|
|
|
+ db.SaveChanges();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ db.Dispose();
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
public void activePrizeWithoutDeposit122(int posid = 0)
|
|
|
{
|