|
@@ -27,7 +27,7 @@ namespace MySystem
|
|
|
{
|
|
|
while(true)
|
|
|
{
|
|
|
- if(DateTime.Now.Hour >= 0 && DateTime.Now.Hour < 3 && DateTime.Now.Minute > 5)
|
|
|
+ if(DateTime.Now.Hour >= 0 && DateTime.Now.Hour < 12)
|
|
|
{
|
|
|
string check = function.ReadInstance("/LeaderComp/" + DateTime.Now.ToString("yyyyMMdd") + ".txt");
|
|
|
if(string.IsNullOrEmpty(check))
|
|
@@ -112,11 +112,13 @@ namespace MySystem
|
|
|
check = db.UserTradeMonthSummary.Any(m => m.UserId == UserId && m.TradeMonth == month && m.SeoTitle == "team" && m.BrandId == 14);
|
|
|
if (check)
|
|
|
{
|
|
|
- TradeAmount += db.UserTradeMonthSummary.Where(m => m.UserId == UserId && m.TradeMonth == month && m.SeoTitle == "team" && m.BrandId == 14).Sum(m => m.ActiveBuddyMerStatus) * 10000;
|
|
|
+ int ActCount = db.UserTradeMonthSummary.Where(m => m.UserId == UserId && m.TradeMonth == month && m.SeoTitle == "team" && m.BrandId == 14).Sum(m => m.ActiveBuddyMerStatus);
|
|
|
+ ActCount += UserDataDbconn.Instance.GetSimActTradeAmt(UserId, month, "Team");
|
|
|
if(db.UserSimActSummary.Any(m => m.UserId == UserId && m.Kind == 1))
|
|
|
{
|
|
|
- TradeAmount -= db.UserSimActSummary.Where(m => m.UserId == UserId && m.Kind == 1).Sum(m => m.ActCount) * 10000;
|
|
|
+ ActCount -= db.UserSimActSummary.Where(m => m.UserId == UserId && m.Kind == 1).Sum(m => m.ActCount);
|
|
|
}
|
|
|
+ TradeAmount += ActCount * 10000;
|
|
|
}
|
|
|
sql += "insert into LeaderCompTradeStat (CreateDate,UserId,StatMonth,TradeAmount) values (now(), " + UserId + ", '" + month + "-" + checkMonth + "', " + TradeAmount + ");\n";
|
|
|
num += 1;
|