Browse Source

领导人达标奖老规则盟主时间限制

lcl 2 weeks ago
parent
commit
c09bc4158c
2 changed files with 4 additions and 3 deletions
  1. 2 1
      AppStart/Helper/LeaderCompPrizeHelper.cs
  2. 2 2
      Startup.cs

+ 2 - 1
AppStart/Helper/LeaderCompPrizeHelper.cs

@@ -71,6 +71,7 @@ namespace MySystem
             {
                 WebCMSEntities db = new WebCMSEntities();
                 string MonthString = month;
+                string Now = DateTime.Parse(month.Substring(0, 4) + "-" + month.Substring(4, 2) + "-01 00:00:00").AddMonths(1).ToString("yyyy-MM-dd HH:mm:ss");
                 string PreMonthString = DateTime.Parse(month.Substring(0, 4) + "-" + month.Substring(4, 2) + "-01 00:00:00").AddMonths(-1).ToString("yyyyMM");
 
                 //统计交易增量
@@ -81,7 +82,7 @@ namespace MySystem
                 int rownum = 0;
                 int num = 0;
                 List<LeaderCompUser> UserData = new List<LeaderCompUser>();
-                string rootsql = "select tb.user_id,pid,pid_path,leader_type,trade_amt,act_trade_amt,unact_trade_amt from (select user_id,sum(if(brand_id not in (18,19,20,21,29,23,24,25,26,32,101,100),help_direct_trade_amt+pro_direct_trade_amt+pro_a_direct_trade_amt+pro_b_direct_trade_amt,0)) trade_amt,sum(if(brand_id in (101,100,18,19,20,21,29),help_direct_trade_amt,0))*4 act_trade_amt,sum(if(brand_id in (101,100,18,19,20,21,29),pro_direct_trade_amt,0)) unact_trade_amt from kxs_user_trade_" + month + " where total_type=1 group by user_id) tb LEFT JOIN kxs_user.kxs_user u on tb.user_id=u.id LEFT JOIN kxs_user.kxs_leader l on tb.user_id=l.id and l.expired_date>now()";
+                string rootsql = "select tb.user_id,pid,pid_path,leader_type,trade_amt,act_trade_amt,unact_trade_amt from (select user_id,sum(if(brand_id not in (18,19,20,21,29,23,24,25,26,32,101,100),help_direct_trade_amt+pro_direct_trade_amt+pro_a_direct_trade_amt+pro_b_direct_trade_amt,0)) trade_amt,sum(if(brand_id in (101,100,18,19,20,21,29),help_direct_trade_amt,0))*4 act_trade_amt,sum(if(brand_id in (101,100,18,19,20,21,29),pro_direct_trade_amt,0)) unact_trade_amt from kxs_user_trade_" + month + " where total_type=1 group by user_id) tb LEFT JOIN kxs_user.kxs_user u on tb.user_id=u.id LEFT JOIN kxs_user.kxs_leader l on tb.user_id=l.id and l.expired_date>'" + Now + "'";
                 function.WriteLog(rootsql, "领导人达标奖励日志");
                 DataTable dt = CustomerSqlConn.dtable(rootsql, MysqlConn.JavaStatSqlConnStr);
                 foreach(DataRow dr in dt.Rows)

+ 2 - 2
Startup.cs

@@ -172,8 +172,8 @@ namespace MySystem
             // }
             
 
-            LeaderCompPrize2Helper.Instance.StartTest();
-            RecommandKingHelper.Instance.StartTest();
+            LeaderCompPrizeHelper.Instance.StartTest();
+            // RecommandKingHelper.Instance.StartTest();
         }
 
         private void InitMain()