|
|
@@ -0,0 +1,414 @@
|
|
|
+using System;
|
|
|
+using System.Collections.Generic;
|
|
|
+using System.Linq;
|
|
|
+using System.Data;
|
|
|
+using MySystem.JavaUserModels;
|
|
|
+using MySystem.JavaStatModels;
|
|
|
+using Library;
|
|
|
+using LitJson;
|
|
|
+using System.Threading;
|
|
|
+using GraphQL;
|
|
|
+
|
|
|
+namespace MySystem
|
|
|
+{
|
|
|
+ public class RecommandKing2Helper
|
|
|
+ {
|
|
|
+ public readonly static RecommandKing2Helper Instance = new RecommandKing2Helper();
|
|
|
+ private RecommandKing2Helper()
|
|
|
+ { }
|
|
|
+
|
|
|
+
|
|
|
+ public void Start()
|
|
|
+ {
|
|
|
+ Thread th = new Thread(StartFor);
|
|
|
+ th.IsBackground = true;
|
|
|
+ th.Start();
|
|
|
+ }
|
|
|
+ public void StartFor()
|
|
|
+ {
|
|
|
+ while (true)
|
|
|
+ {
|
|
|
+ if(DateTime.Now.Hour > 13 && DateTime.Now.Hour < 23)
|
|
|
+ {
|
|
|
+ string today = DateTime.Now.ToString("yyyy-MM-dd");
|
|
|
+ string checkFlag = function.ReadInstance("/RecommandKing/" + today + ".txt");
|
|
|
+ if(string.IsNullOrEmpty(checkFlag))
|
|
|
+ {
|
|
|
+ function.WritePage("/RecommandKing/", today + ".txt", DateTime.Now.ToString());
|
|
|
+
|
|
|
+ if(DateTime.Now.Day == 2)
|
|
|
+ {
|
|
|
+ Recommend(DateTime.Now.AddMonths(-1).ToString("yyyyMM"), 1);
|
|
|
+ Recommend(DateTime.Now.AddMonths(-1).ToString("yyyyMM"), 2);
|
|
|
+ // Recommend(DateTime.Now.AddMonths(-1).ToString("yyyyMM"), 3);
|
|
|
+ }
|
|
|
+ Recommend(DateTime.Now.ToString("yyyyMM"), 1);
|
|
|
+ Recommend(DateTime.Now.ToString("yyyyMM"), 2);
|
|
|
+ // Recommend(DateTime.Now.ToString("yyyyMM"), 3);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Thread.Sleep(600000);
|
|
|
+ }
|
|
|
+ // string today = DateTime.Now.ToString("yyyy-MM-dd");
|
|
|
+ // string checkFlag = function.ReadInstance("/RecommandKing/" + today + ".txt");
|
|
|
+ // if(string.IsNullOrEmpty(checkFlag))
|
|
|
+ // {
|
|
|
+ // function.WritePage("/RecommandKing/", today + ".txt", DateTime.Now.ToString());
|
|
|
+ // Recommend(DateTime.Now.AddMonths(-2).ToString("yyyyMM"), 1);
|
|
|
+ // Recommend(DateTime.Now.AddMonths(-2).ToString("yyyyMM"), 2);
|
|
|
+ // Recommend(DateTime.Now.AddMonths(-1).ToString("yyyyMM"), 1);
|
|
|
+ // Recommend(DateTime.Now.AddMonths(-1).ToString("yyyyMM"), 2);
|
|
|
+ // Recommend(DateTime.Now.ToString("yyyyMM"), 1);
|
|
|
+ // Recommend(DateTime.Now.ToString("yyyyMM"), 2);
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ public void Recommend(string TradeMonth, int Kind)
|
|
|
+ {
|
|
|
+ int TradeMonthNum = int.Parse(TradeMonth);
|
|
|
+ int CheckCount = 0;
|
|
|
+ if(Kind == 1) CheckCount = 40;
|
|
|
+ if(Kind >= 2) CheckCount = 50;
|
|
|
+ List<int> ReduceUserId = new List<int>();
|
|
|
+ MySystem.JavaUserModels.WebCMSEntities db = new MySystem.JavaUserModels.WebCMSEntities();
|
|
|
+ List<KxsInviteKing> list = new List<KxsInviteKing>();
|
|
|
+ List<int> Historys = new List<int>();
|
|
|
+
|
|
|
+ DateTime check = DateTime.Parse("2025-01-01 00:00:00");
|
|
|
+ DateTime checkEnd = DateTime.Parse(TradeMonth.Substring(0, 4) + "-" + TradeMonth.Substring(4, 2) + "-01 00:00:00").AddMonths(1);
|
|
|
+ DateTime start = DateTime.Parse(TradeMonth.Substring(0, 4) + "-" + TradeMonth.Substring(4, 2) + "-01 00:00:00");
|
|
|
+ DateTime end = start.AddMonths(1);
|
|
|
+ CustomerSqlConn.op("delete from kxs_invite_king where trade_month='" + TradeMonth + "' and kind=" + Kind, MysqlConn.JavaUserSqlConnStr);
|
|
|
+ List<int> ProductIds = new List<int>();
|
|
|
+ ProductIds.Add(10);
|
|
|
+ ProductIds.Add(11);
|
|
|
+ ProductIds.Add(77);
|
|
|
+ ProductIds.Add(78);
|
|
|
+ ProductIds.Add(79);
|
|
|
+ ProductIds.Add(27);
|
|
|
+ ProductIds.Add(28);
|
|
|
+ ProductIds.Add(39);
|
|
|
+ ProductIds.Add(40);
|
|
|
+ ProductIds.Add(92);
|
|
|
+ List<RecommandKingItem> users = new List<RecommandKingItem>();
|
|
|
+ JavaStatModels.WebCMSEntities statdb = new JavaStatModels.WebCMSEntities();
|
|
|
+ JavaProductModels.WebCMSEntities productdb = new JavaProductModels.WebCMSEntities();
|
|
|
+ MpMainModels.WebCMSEntities mpdb = new MpMainModels.WebCMSEntities();
|
|
|
+ MpMainModels2.WebCMSEntities mpdb2 = new MpMainModels2.WebCMSEntities();
|
|
|
+ //统计当月下单名单
|
|
|
+ var orderids = productdb.KxsShopOrderInfo.Where(m => ProductIds.Contains(m.GoodsId)).ToList().Select(m => m.OrderId).ToList();
|
|
|
+ List<int> statusList = new List<int>();
|
|
|
+ statusList.Add(1);
|
|
|
+ statusList.Add(2);
|
|
|
+ statusList.Add(3);
|
|
|
+ var orders = productdb.KxsShopOrder.Where(m => m.PayTime >= check && m.PayTime < checkEnd && statusList.Contains(m.Status) && m.UserId > 1 && orderids.Contains(m.Id) && m.ReturnStatus == 0).ToList();
|
|
|
+ function.WriteLog("kind:" + Kind + "--" + orders.Count.ToString(), "推荐王日志");
|
|
|
+ List<int> uids = orders.Select(m => m.UserId).Distinct().ToList();
|
|
|
+ foreach(int uid in uids)
|
|
|
+ {
|
|
|
+ JavaUserModels.KxsUser user = db.KxsUser.FirstOrDefault(m => m.Id == uid);
|
|
|
+ if(user != null)
|
|
|
+ {
|
|
|
+ if(!users.Any(m => m.UserId == user.Id))
|
|
|
+ {
|
|
|
+ users.Add(new RecommandKingItem()
|
|
|
+ {
|
|
|
+ UserId = user.Id,
|
|
|
+ ParentUserId = user.Pid,
|
|
|
+ ParentNav = user.PidPath,
|
|
|
+ // PreAmount = PreMonthAmt.ContainsKey(user.Id) ? PreMonthAmt[user.Id] : 0,
|
|
|
+ Level = user.PidPath.Replace(",,", ",").Trim(',').Split(',').Length + 1,
|
|
|
+ UserLevel = user.UserLevel,
|
|
|
+ Kind = 1,
|
|
|
+ Op = false,
|
|
|
+ });
|
|
|
+ function.WriteLog("kind:" + Kind + "-1-" + user.Id.ToString(), "推荐王日志");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ foreach(RecommandKingItem user in users)
|
|
|
+ {
|
|
|
+ int uid = user.UserId;
|
|
|
+ int ActCount = 0;
|
|
|
+ if(ActCount == 0)
|
|
|
+ {
|
|
|
+ if(statdb.KxsUserActTrade.Any(m => m.UserId == uid && m.TradeMonth == TradeMonthNum && m.TotalType == 0))
|
|
|
+ {
|
|
|
+ ActCount += statdb.KxsUserActTrade.Where(m => m.UserId == uid && m.TradeMonth == TradeMonthNum && m.TotalType == 0).Sum(m => m.ActNum);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(ActCount == 0)
|
|
|
+ {
|
|
|
+ ActCount += mpdb.MerchantDepositOrder.Count(m => m.UserId == uid && m.CreateDate >= start && m.CreateDate < end && m.Status > 0 && m.UserId == uid);
|
|
|
+ }
|
|
|
+ if(ActCount == 0)
|
|
|
+ {
|
|
|
+ ActCount += mpdb2.MerchantDepositOrder.Count(m => m.UserId == uid && m.CreateDate >= start && m.CreateDate < end && m.Status > 0 && m.UserId == uid);
|
|
|
+ }
|
|
|
+ if(ActCount > 0)
|
|
|
+ {
|
|
|
+ user.Op = true;
|
|
|
+ function.WriteLog("有效标记-kind:" + Kind + "--" + user.ParentNav.ToString() + "->" + user.UserId.ToString(), "推荐王日志");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ foreach(int uid in uids)
|
|
|
+ {
|
|
|
+ JavaUserModels.KxsUser user = db.KxsUser.FirstOrDefault(m => m.Id == uid);
|
|
|
+ if(user != null)
|
|
|
+ {
|
|
|
+ string[] ParentIds = user.PidPath.Replace(",,", ",").Trim(',').Split(',');
|
|
|
+ foreach(string ParentId in ParentIds)
|
|
|
+ {
|
|
|
+ int ParentUserId = int.Parse(ParentId);
|
|
|
+ JavaUserModels.KxsUser puser = db.KxsUser.FirstOrDefault(m => m.Id == ParentUserId && m.Id > 1);
|
|
|
+ if(puser != null)
|
|
|
+ {
|
|
|
+ if(!users.Any(m => m.UserId == puser.Id))
|
|
|
+ {
|
|
|
+ users.Add(new RecommandKingItem()
|
|
|
+ {
|
|
|
+ UserId = puser.Id,
|
|
|
+ ParentUserId = puser.Pid,
|
|
|
+ ParentNav = puser.PidPath,
|
|
|
+ // PreAmount = PreMonthAmt.ContainsKey(puser.Id) ? PreMonthAmt[puser.Id] : 0,
|
|
|
+ Level = puser.PidPath.Replace(",,", ",").Trim(',').Split(',').Length + 1,
|
|
|
+ UserLevel = puser.UserLevel,
|
|
|
+ Kind = 2,
|
|
|
+ Op = false,
|
|
|
+ });
|
|
|
+ function.WriteLog("kind:" + Kind + "--" + puser.Id.ToString() + "-p", "推荐王日志");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ users = users.OrderByDescending(m => m.Level).ToList();
|
|
|
+ foreach(RecommandKingItem user in users)
|
|
|
+ {
|
|
|
+ string UserIdStr = "," + user.UserId + ",";
|
|
|
+ int Count = users.Count(m => m.ParentNav.Contains(UserIdStr) && m.Op);
|
|
|
+ user.ActCount = Count;
|
|
|
+ user.ChkActCount = Count;
|
|
|
+ function.WriteLog("kind:" + Kind + "--" + user.UserId + ":" + Count, "推荐王日志");
|
|
|
+ // RedisDbconn.Instance.AddList("userstmp2024", user);
|
|
|
+ }
|
|
|
+ // users = RedisDbconn.Instance.GetList<RecommandKingItem>("userstmp2024", 1, 999999).OrderByDescending(m => m.Level).ToList();
|
|
|
+ users = users.OrderByDescending(m => m.Level).ToList();
|
|
|
+ foreach(RecommandKingItem user in users)
|
|
|
+ {
|
|
|
+ function.WriteLog("kind:" + Kind + "--" + user.UserId.ToString() + "-" + user.UserLevel, "推荐王日志");
|
|
|
+ int ActCount = 0;
|
|
|
+ List<RecommandKingItem> subs = users.Where(m => m.ParentUserId == user.UserId).ToList();
|
|
|
+ foreach(RecommandKingItem sub in subs)
|
|
|
+ {
|
|
|
+ function.WriteLog("kind:" + Kind + "--" + sub.UserId + ":" + sub.ActCount, "推荐王日志");
|
|
|
+ if(sub.ActCount < CheckCount && sub.UserLevel < 5)// && !Historys.Contains(sub.UserId))
|
|
|
+ {
|
|
|
+ ActCount += sub.ActCount;
|
|
|
+ if(sub.Op) ActCount += 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ user.ActCount = ActCount;
|
|
|
+ function.WriteLog("\n\n\n", "推荐王日志");
|
|
|
+ }
|
|
|
+
|
|
|
+ int num = 0;
|
|
|
+ foreach(RecommandKingItem user in users)
|
|
|
+ {
|
|
|
+ bool op = true;
|
|
|
+ // if(Kind == 1)
|
|
|
+ // {
|
|
|
+ // op = !Historys.Contains(user.UserId);
|
|
|
+ // }
|
|
|
+ if(op)
|
|
|
+ {
|
|
|
+ num += 1;
|
|
|
+ KxsInviteKing item = db.KxsInviteKing.FirstOrDefault(m => m.UserId == user.UserId && m.TradeMonth == TradeMonthNum && m.Kind == Kind);
|
|
|
+ if(item == null)
|
|
|
+ {
|
|
|
+ if(user.ActCount > 0)
|
|
|
+ {
|
|
|
+ function.WriteLog("入库-kind:" + Kind + "--" + user.UserId.ToString(), "推荐王日志");
|
|
|
+ item = db.KxsInviteKing.Add(new KxsInviteKing()
|
|
|
+ {
|
|
|
+ UserId = user.UserId,
|
|
|
+ TradeMonth = TradeMonthNum,
|
|
|
+ StepNum = user.ActCount > CheckCount ? CheckCount : user.ActCount,
|
|
|
+ Kind = Kind,
|
|
|
+ }).Entity;
|
|
|
+ }
|
|
|
+ if(num % 200 == 0)
|
|
|
+ {
|
|
|
+ db.SaveChanges();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ db.SaveChanges();
|
|
|
+ db.Dispose();
|
|
|
+ statdb.Dispose();
|
|
|
+ productdb.Dispose();
|
|
|
+ mpdb.Dispose();
|
|
|
+ mpdb2.Dispose();
|
|
|
+ }
|
|
|
+
|
|
|
+ public decimal GetTradeAmt(int UserId, string TradeMonth)
|
|
|
+ {
|
|
|
+ ReadModels.WebCMSEntities rdb = new ReadModels.WebCMSEntities();
|
|
|
+ MpMainModels.WebCMSEntities mpmaindb = new MpMainModels.WebCMSEntities();
|
|
|
+ MpMainModels2.WebCMSEntities mpmaindb2 = new MpMainModels2.WebCMSEntities();
|
|
|
+ decimal TradeAmount = 0;
|
|
|
+ //创客团队交易额
|
|
|
+ bool check = rdb.TradeDaySummary.Any(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.SeoTitle == "team");
|
|
|
+ if (check)
|
|
|
+ {
|
|
|
+ TradeAmount += rdb.TradeDaySummary.Where(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.SeoTitle == "team").Sum(m => m.HelpNonDirectTradeAmt + m.HelpNonDirectDebitTradeAmt + m.NotHelpNonDirectTradeAmt + m.NotHelpNonDirectDebitTradeAmt + m.ProfitNonDirectTradeAmt + m.ProfitNonDirectDebitTradeAmt);
|
|
|
+ }
|
|
|
+ check = rdb.TradeDaySummary2.Any(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.SeoTitle == "team");
|
|
|
+ if (check)
|
|
|
+ {
|
|
|
+ TradeAmount += rdb.TradeDaySummary2.Where(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.SeoTitle == "team").Sum(m => m.ProfitTradeAmt + m.ProfitDebitTradeAmt);
|
|
|
+ }
|
|
|
+ //码牌团队交易额(直联)
|
|
|
+ check = mpmaindb.UserAmountSummary.Any(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.SeoTitle == "team");
|
|
|
+ if (check)
|
|
|
+ {
|
|
|
+ TradeAmount += mpmaindb.UserAmountSummary.Where(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.SeoTitle == "team" && m.IsAct == 1).Sum(m => m.TotalAmount) * 4;
|
|
|
+ }
|
|
|
+ //码牌团队交易额(银联)
|
|
|
+ check = mpmaindb2.UserAmountSummary.Any(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.SeoTitle == "team");
|
|
|
+ if (check)
|
|
|
+ {
|
|
|
+ TradeAmount += mpmaindb2.UserAmountSummary.Where(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.SeoTitle == "team" && m.IsAct == 1).Sum(m => m.TotalAmount) * 4;
|
|
|
+ }
|
|
|
+ //广电卡扶持期按1万/张计入职级
|
|
|
+ check = rdb.UserTradeMonthSummary.Any(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.SeoTitle == "team" && m.BrandId == 14);
|
|
|
+ if (check)
|
|
|
+ {
|
|
|
+ TradeAmount += rdb.UserTradeMonthSummary.Where(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.SeoTitle == "team" && m.BrandId == 14).Sum(m => m.ActiveBuddyMerStatus) * 10000;
|
|
|
+ }
|
|
|
+ return TradeAmount;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Dictionary<int, decimal> GetTradeAmtList(string TradeMonth)
|
|
|
+ {
|
|
|
+ Dictionary<int, decimal> dic = new Dictionary<int, decimal>();
|
|
|
+ ReadModels.WebCMSEntities rdb = new ReadModels.WebCMSEntities();
|
|
|
+ MpMainModels.WebCMSEntities mpmaindb = new MpMainModels.WebCMSEntities();
|
|
|
+ MpMainModels2.WebCMSEntities mpmaindb2 = new MpMainModels2.WebCMSEntities();
|
|
|
+ //创客团队交易额
|
|
|
+ bool check = rdb.TradeDaySummary.Any(m => m.TradeMonth == TradeMonth && m.SeoTitle == "team");
|
|
|
+ if (check)
|
|
|
+ {
|
|
|
+ var list = rdb.TradeDaySummary.Where(m => m.TradeMonth == TradeMonth && m.SeoTitle == "team").ToList().GroupBy(m => m.UserId);
|
|
|
+ foreach(var item in list)
|
|
|
+ {
|
|
|
+ int UserId = item.Key;
|
|
|
+ decimal Amt = item.Sum(m => m.HelpNonDirectTradeAmt + m.HelpNonDirectDebitTradeAmt + m.NotHelpNonDirectTradeAmt + m.NotHelpNonDirectDebitTradeAmt + m.ProfitNonDirectTradeAmt + m.ProfitNonDirectDebitTradeAmt);
|
|
|
+ if(!dic.ContainsKey(UserId))
|
|
|
+ {
|
|
|
+ dic.Add(UserId, Amt);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ dic[UserId] += Amt;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ check = rdb.TradeDaySummary2.Any(m => m.TradeMonth == TradeMonth && m.SeoTitle == "team");
|
|
|
+ if (check)
|
|
|
+ {
|
|
|
+ var list = rdb.TradeDaySummary2.Where(m => m.TradeMonth == TradeMonth && m.SeoTitle == "team").ToList().GroupBy(m => m.UserId);
|
|
|
+ foreach(var item in list)
|
|
|
+ {
|
|
|
+ int UserId = item.Key;
|
|
|
+ decimal Amt = item.Sum(m => m.ProfitTradeAmt + m.ProfitDebitTradeAmt);
|
|
|
+ if(!dic.ContainsKey(UserId))
|
|
|
+ {
|
|
|
+ dic.Add(UserId, Amt);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ dic[UserId] += Amt;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //码牌团队交易额(直联)
|
|
|
+ check = mpmaindb.UserAmountSummary.Any(m => m.TradeMonth == TradeMonth && m.SeoTitle == "team");
|
|
|
+ if (check)
|
|
|
+ {
|
|
|
+ var list = mpmaindb.UserAmountSummary.Where(m => m.TradeMonth == TradeMonth && m.SeoTitle == "team" && m.IsAct == 1).ToList().GroupBy(m => m.UserId);
|
|
|
+ foreach(var item in list)
|
|
|
+ {
|
|
|
+ int UserId = item.Key;
|
|
|
+ decimal Amt = item.Sum(m => m.TotalAmount) * 4;
|
|
|
+ if(!dic.ContainsKey(UserId))
|
|
|
+ {
|
|
|
+ dic.Add(UserId, Amt);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ dic[UserId] += Amt;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //码牌团队交易额(银联)
|
|
|
+ check = mpmaindb2.UserAmountSummary.Any(m => m.TradeMonth == TradeMonth && m.SeoTitle == "team");
|
|
|
+ if (check)
|
|
|
+ {
|
|
|
+ var list = mpmaindb2.UserAmountSummary.Where(m => m.TradeMonth == TradeMonth && m.SeoTitle == "team" && m.IsAct == 1).ToList().GroupBy(m => m.UserId);
|
|
|
+ foreach(var item in list)
|
|
|
+ {
|
|
|
+ int UserId = item.Key;
|
|
|
+ decimal Amt = item.Sum(m => m.TotalAmount) * 4;
|
|
|
+ if(!dic.ContainsKey(UserId))
|
|
|
+ {
|
|
|
+ dic.Add(UserId, Amt);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ dic[UserId] += Amt;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //广电卡扶持期按1万/张计入职级
|
|
|
+ check = rdb.UserTradeMonthSummary.Any(m => m.TradeMonth == TradeMonth && m.SeoTitle == "team" && m.BrandId == 14);
|
|
|
+ if (check)
|
|
|
+ {
|
|
|
+ var list = rdb.UserTradeMonthSummary.Where(m => m.TradeMonth == TradeMonth && m.SeoTitle == "team" && m.BrandId == 14).ToList().GroupBy(m => m.UserId);
|
|
|
+ foreach(var item in list)
|
|
|
+ {
|
|
|
+ int UserId = item.Key;
|
|
|
+ decimal Amt = item.Sum(m => m.ActiveBuddyMerStatus) * 10000;
|
|
|
+ if(!dic.ContainsKey(UserId))
|
|
|
+ {
|
|
|
+ dic.Add(UserId, Amt);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ dic[UserId] += Amt;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return dic;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public void StartTest()
|
|
|
+ {
|
|
|
+ Thread th = new Thread(StartTestFor);
|
|
|
+ th.IsBackground = true;
|
|
|
+ th.Start();
|
|
|
+ }
|
|
|
+ public void StartTestFor()
|
|
|
+ {
|
|
|
+ string check = function.ReadInstance("/RecommandKing/Repeat/202502.txt");
|
|
|
+ if (string.IsNullOrEmpty(check))
|
|
|
+ {
|
|
|
+ function.WritePage("/RecommandKing/Repeat/", "202502.txt", DateTime.Now.ToString());
|
|
|
+ Recommend("202502", 1);
|
|
|
+ Recommend("202502", 2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|