|
@@ -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)
|