浏览代码

领导培养奖励,盟主过期时间判断,改为次月初

lcl 3 周之前
父节点
当前提交
9fe6ad0e56
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      AppStart/Helper/LeaderCompPrize2Helper.cs

+ 2 - 1
AppStart/Helper/LeaderCompPrize2Helper.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 from (select user_id,trade_amt from kxs_user_trade_info where trade_month='" + month + "' and trade_amt>0) tb LEFT JOIN kxs_user u on tb.user_id=u.id LEFT JOIN 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 from (select user_id,trade_amt from kxs_user_trade_info where trade_month='" + month + "' and trade_amt>0) tb LEFT JOIN kxs_user u on tb.user_id=u.id LEFT JOIN kxs_leader l on tb.user_id=l.id and l.expired_date>='" + Now + "'";
                 function.WriteLog(rootsql, "领导人达标奖励日志");
                 DataTable dt = CustomerSqlConn.dtable(rootsql, MysqlConn.JavaUserSqlConnStr);
                 foreach(DataRow dr in dt.Rows)